| View previous topic :: View next topic |
| Author |
Message |
skywalker Voice
Joined: 07 Jan 2012 Posts: 5
|
Posted: Mon Mar 05, 2012 4:58 pm Post subject: how to use shortnick instead of trigger |
|
|
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 |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Tue Mar 06, 2012 1:39 am Post subject: |
|
|
You can do something like this:
| Code: | 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: | | bind pubm - "% $::botnick*" botproc |
And read this: http://tclhelp.net/unb/114 _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
|
| Back to top |
|
 |
|