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.

Bot msg

Old posts that have not been replied to for several years.
Locked
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Bot msg

Post by Dizzle »

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
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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.
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

thx i going too try it

the trigger is a msg like /msg bot join #channel
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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 '#'.
 }
}
Locked