This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Requesting Tcl script for Admin Eggdrop

Old posts that have not been replied to for several years.
Locked
Q
QTN
Voice
Posts: 1
Joined: Sun Nov 30, 2003 9:27 am

Requesting Tcl script for Admin Eggdrop

Post by QTN »

Hello everybody, :wink:
I was just installed eggdrop1.6.15 last week and followed the links from http://www.egghelp.org to get in here, this forums the egghelp.org community! 8) I'm so pround that i've a Registered at where are all Tcl's experts stayed on and living in it! 8)
After spends the whole week read all topics in here and RTFM, included all C:\....\eggdrop\doc's documents. I'd understand that Tcl is not easy to scripting and so confused me! That's why i'm posted this topic for asking HELP from all Tcl's experts. Here we go......... :lol:
My server is running UltimateIRCD 2.8.6 with Epona1.4.14 services. In my mIRC 6.12 Script Editor window contained the following which 1stPart is in Aliases tab and the rest parts are in Remote tab. I would like to request you all Dear Sir/Madam help me to build the Tcl scripts for my eggdrop with nick QTN working as same as my mIRC.


1stPart: When my mIRC connected to the server, it'll automaticaly identify with NickServ and auto oper-up to be a Admin with included self set extra modes, then auto joins/identify the below channels.
F3 identify mynickpass | oper QTN myoperpass | mode $me +aBPR-fghkmnswCGMTW | join #Lobby,#Lyrics,#Poems,#Games,#FamousQuotes,#Wars | cs identify #Main mainpass | cs identify #Help helppass | cs identify #Staff staffpass | cs identify #Moderator moderatorpass | cs identify #Lobby lobbypass | cs identify #Lyrics lyricpass | cs identify #Poems poempass | cs identify #Games gamepass | cs identify #FamousQuotes flirtpass | cs identify #Wars warspass
Notice: Aliases function key F3 is a Perform On Connect command, cs = msg Chanserv, | = separate stacking commands


2ndPart: Op whoever join #Wars. Op in #Main get forced join #Moderator and op in #Help. With bot respond the events message in #Moderator and so on.....
on *:JOIN:#Wars:cs op $chan $nick
on *:OP:#Main:cs clear #Moderator bans | bs act #Main thank you $opnick | msg #Moderator *** $nick sets mode $chan : $1- | os raw svsjoin $opnick #Help,#Moderator | cs op #Help $opnick
on *:OP:#Help:msg #Moderator *** $nick sets mode $chan : $1- | os raw svsjoin $opnick #Moderator
on *:DEOP:#Main,#Help:bs say $chan uh oh $opnick | msg #Moderator *** $nick sets mode $chan : $1- | os raw svspart $opnick #Moderator | cs ban #Moderator $opnick
on *:OP:#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:DEOP:#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:HELP:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:DEHELP:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:VOICE:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:bs say $chan $vnick is a girl in here! Be nice and keep active guys :) | msg #Moderator *** $nick sets mode $chan : $1-
on *:DEVOICE:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:BAN:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:UNBAN:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick sets mode $chan : $1-
on *:PART:#Main:os raw svsjoin $nick #Wars
on *:PART:#Staff,#Moderator:os raw svsjoin $nick $chan
on *:PART:#Wars:os raw svsjoin $nick #Main
on *:KICK:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $knick was kicked from $chan by $nick ( $1- ) | os raw svsjoin $knick #Wars
on *:MODE:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick changed $chan mode to $1-
on *:TOPIC:#Main,#Help,#Lobby,#Lyrics,#Poems,#Games,#FamousQuotes:msg #Moderator *** $nick changes topic channel $chan to ' $1- '
on *:SERVERMODE:#:msg #Moderator *** $nick changed $chan mode to $1-
on *:SERVEROP:#:msg #Moderator *** $nick sets mode $chan : $1-
Notice: bs = msg BotServ, os = msg OperServ


3rdPart: When clones join #Main & #Wars, then responding message in #Moderator ex: <QTN> Joining Clones scan for *!*@hostmask connecting by nicks: biggun, Coast_Guy, MLOVE, Womanlovely, Tommy_USA, bluesnake
; $1 = Channel, $2 = Nick
alias clonecount {
return $ialchan($address($2,2),$1,0)
}
; $1 = Channel, $2 = Nick
alias clonescan {
var %count = $clonecount($1,$2)
if ( %count == $null ) {
echo $color(notice text) $chan Clone scan: No connections from $address($2,2)
}
else {
var %x = 1
var %clones
while ( %x <= %count ) {
%clones = %clones $ialchan($address($2,2),$1,%x).nick
inc %x
}
%clones = $replace(%clones,$chr(32),$chr(44) $+ $chr(32))
msg #Moderator Joining Clones scan for $address($2,2) connecting by nicks $+ : %clones
}
}
on *:JOIN:#Main,#Wars: {
if ( $clonecount($chan,$nick) > 1) clonescan $chan $nick
}

4thPart: !lyrics in #Lyrics, !poems in #Poems, !fquotes in #FamousQuotes
!lyrics will msg private to requester !alyrics, !blyrics.....!zlyrics, !0-9lyrics
!alyrics msg private to requester !ab Autumn Goodbye - Britney Spears, !attwx And Then There Was X - DMX ....etc....
!ab bot will read the AutumnGoodbye-BritneySpears.txt in #Lyrics with 5 seconds/line
..
..
!wlyrics msg private !wgigo We've Got It Going On - Backstreet Boys, !omgwtf (_._)(_x_)(_!_)(_o_) - Unknow
..
...
..
!fquotes bot will read random line in FamousQuotes.txt every 5 minutes.

Thank you all for reading this topic. Any help, reply or link will be much to sincere gratitude.
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Well, I didn't read all the post, but I can give you some directions:
Eggdrops can bind the connection, and so perform several action.
Here's the script I use to initialize mine:

Code: Select all

set nickserv "nickserv"
set chanserv "chanserv"
set hostserv "hostserv"
set pass "bot_pass"

bind evnt - "init-server" ident:on

proc ident:on { type } {
    global botnick nickserv hostserv pass username
    putserv "MODE $botnick +iB-ws"
    putquick "PRIVMSG $nickserv :GHOST $username $pass"
    putquick "PRIVMSG $nickserv :IDENTIFY $pass"
    putquick "PRIVMSG $hostserv :ON"
    bind notc - "*IDENTIFY*" init:ident
}
proc init:ident {nick uhost handle text {dest ""}} {
    global botnick nickserv hostserv pass 
    if {$dest == ""} {
	set dest $botnick
    }
    putserv "PRIVMSG $nickserv :identify $pass"
    putserv "PRIVMSG $hostserv :ON"
}
If you can't understand it, I'll explain:
I define the nickserv, chanserv and hostserv nicks, and I bind an initialisation of connection to the server.
When connecting, I send some commands, as mode, ghost, identify...
And I bind the nickserv notice for identify (usefull when regain nickname).

For the second part, you may find some scripts...
Just a little tip: add an user war_user like this:
.+user war_user *!*@*
.chattr war_user +o #war
.save
And everybody joining #war will be opped
Locked