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.
-
Moonshine
- Voice
- Posts: 19
- Joined: Sat Aug 09, 2003 4:19 pm
Post
by Moonshine »
is it possible to set a trigger that include spaces and special letters like . : ??
like:
.: add news :.
instead of
!addnews
-
ppslim
- Revered One
- Posts: 3914
- Joined: Sun Sep 23, 2001 8:00 pm
- Location: Liverpool, England
Post
by ppslim »
Use the PUBM bind.
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Code: Select all
bind pub - .: test:cmd
proc test:cmd {nick uhost hand chan arg} {
set arg [split $arg]
set word1 [lindex $arg 0]
set word2 [lindex $arg 1]
if {$word1 == "add" && $word2 == "news"} {
#bla bla....
}
}
this is an example of how to do it.
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
u can also do a
switch -- $arg
for example:
Code: Select all
bind pub - .: test:cmd
proc test:cmd {nick uhost hand chan arg} {
switch -- $arg {
"add" {
if {[lindex $arg 1] == "user"} {
#bla bla....
}
}
}
}
I'm not sure about the if statement though.
-
Moonshine
- Voice
- Posts: 19
- Joined: Sat Aug 09, 2003 4:19 pm
Post
by Moonshine »
THX Sir_Fz
Your first code example works perfect for me .