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.

tcl help

Old posts that have not been replied to for several years.
Locked
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

tcl help

Post by RaDoM »

hi,

i want to do a tcl for my eggdrop and i want when i type in a chan any trigger (ex. !damn), the bot reply me with a text?

thanks in advance
.:: RaDoM ::.

The future is nearby!
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Did you even TRY searching for an answer?
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

it's much more easier than you think.
here is an example:

Code: Select all

bind pub o !damn damn:pub

proc damn:pub {nick host handle chan args} {
puthelp "NOTICE $nick :Hey there!"
return 1
}
the bot will reply with a notice to you "Hey there!"
if you want the bot to reply in the channel replace

Code: Select all

NOTICE $nick
with

Code: Select all

PRIVMSG $chan
if you read the tcl-commands.doc or just read some tcl scripts that contain a pub bind you will be able to make your own tcl scripts :wink:
«A fantastic spaghetti is a spaghetti that does not exist»
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

Post by RaDoM »

ohh, thanks i'll try again
.:: RaDoM ::.

The future is nearby!
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

Post by RaDoM »

and if i want to add anothers lines for reply, what have i add?
.:: RaDoM ::.

The future is nearby!
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you can add other binds or do something like this:

Code: Select all

bind pub o !damn damn:pub

proc damn:pub {nick host handle chan args} { 
if {$args == hi} {
puthelp "NOTICE $nick :Hey there!"
}
if {$args == bye} {
puthelp "NOTICE $nick :Bye. c ya later!"
}
return 1
}
with a script like that if an op (+o flag) says !damn hi the bot will reply with a notice "Hey there!"
and if he says !damn bye the bot will reply with a notice "Bye. c ya later!"

or you can test with TCL with a script like this....

Code: Select all

bind pub o !mode mode:pub

proc mode:pub {nick host handle chan args} {
 set args [lindex $args 0]
 set mode [lindex $args 0]
set target [lindex $args 1]
if {$mode == op} {
putserv "MODE $chan +o $target"
}
if {$mode == deop} {
putserv "MODE $chan -o $target"
}
}
and that's it :P
«A fantastic spaghetti is a spaghetti that does not exist»
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

Post by RaDoM »

heeheh, thankss

hmmm, another thing, where can i get for learn to tcl scripting?

thx :)
.:: RaDoM ::.

The future is nearby!
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

you can find some useful sites here.
«A fantastic spaghetti is a spaghetti that does not exist»
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

Post by RaDoM »

heheh, thank u very much for all.

but another question, it's possible that eggdrop connected to a ftp server and execute a command (egg has all permissions)?

thx in advance
.:: RaDoM ::.

The future is nearby!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Yes, it's possible. Use a tcl script that was designed to do so. See the TCL Archive for one..
Once the game is over, the king and the pawn go back in the same box.
R
RaDoM
Voice
Posts: 17
Joined: Mon Mar 10, 2003 2:32 pm
Location: uNd3rGr0uNd C1Ty

Post by RaDoM »

yes but anybody does i want it :(

for example, i type !lol, then send a command via ftp (ex. site help) and reply with the result (in this case the help).
.:: RaDoM ::.

The future is nearby!
Locked