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.
Old posts that have not been replied to for several years.
Dizzle
Op
Posts: 109 Joined: Thu Apr 28, 2005 11:21 am
Contact:
Post
by Dizzle » Sun May 15, 2005 11:31 am
Im having a trouble with a request system, when ppl request and its approved then the bot will say too one of its other bots too join a channel
like this /msg bot JOIN #channel
but how i make the bot react on the channel name, because when things go right the channel name will be different each time
i know i should use the bind
bind msg - "" msg:join
butt i cant figger it out how too filter the channel name out of ihe private msg
can you guys give me a hand plz
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sun May 15, 2005 1:10 pm
Do you mean to say how to add a trigger? or add more than one triggers?
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun May 15, 2005 2:12 pm
Suppose you want the request trigger to be !join, and the first word after the trigger is the #channel. So this is how you grab it:
Code: Select all
bind msg - !join msg:join
proc msg:join {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
# $chan is the first word after !join, so you should check if it's a valid
# channel name.
Dizzle
Op
Posts: 109 Joined: Thu Apr 28, 2005 11:21 am
Contact:
Post
by Dizzle » Mon May 16, 2005 3:43 am
thx i going too try it
the trigger is a msg like /msg bot join #channel
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon May 16, 2005 5:58 am
It would look something like this with the check:
Code: Select all
bind msg - join msg:join
proc join:chan {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
if ![string first # $chan] {
# $chan is valid since it's first character is '#'.
}
}