egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to use shortnick instead of trigger

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
skywalker
Voice


Joined: 07 Jan 2012
Posts: 5

PostPosted: Mon Mar 05, 2012 4:58 pm    Post subject: how to use shortnick instead of trigger Reply with quote

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
View user's profile Send private message
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Tue Mar 06, 2012 1:39 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Tue Mar 06, 2012 5:02 am    Post subject: Reply with quote

And read this: http://tclhelp.net/unb/114
_________________
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber