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.
Help for those learning Tcl or writing their own scripts.
skywalker
Voice
Posts: 5 Joined: Sat Jan 07, 2012 7:46 pm
Post
by skywalker » Mon Mar 05, 2012 4:58 pm
how can i make it to be able to use a short nick instead of the trigger?
Lets say the bot is named botname and the trigger is !
then i would like to be able to use "bot command" also instead of only !command this for room with multiple bots on it.
If this is not possible then the shortnick instead of the trigger will be ok also
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Tue Mar 06, 2012 1:39 am
You can do something like this:
Code: Select all
bind pubm - "*" botproc
proc botproc {nick uhost hand chan text} {
global botnick
if {[lindex [split $text] 0] == $botnick} {
# Your code here...
}
}
Or add botnick to bind itself:
Code: Select all
bind pubm - "% $::botnick*" botproc
And read this:
http://tclhelp.net/unb/114
username
Op
Posts: 196 Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:
Post
by username » Tue Mar 06, 2012 5:02 am