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.
Storm
Voice
Posts: 36 Joined: Fri Apr 25, 2003 12:59 am
Location: Vancouver, Canada
Post
by Storm » Fri May 30, 2003 4:38 pm
Hey, I'm trying to make a script so the bot will op users on /me op...
Code: Select all
bind CTCP - action act:cmds
proc act:cmds { nick host handle chan keyword text } {
if { $text == "op" } {
putserv "MODE $chan +o $nick"
}
}
So this script works. And how to make it so if I use /me op someonesNickName , the bot will OP that nickname, not me...
Thanks
!
mortician
Voice
Posts: 37 Joined: Sun Sep 22, 2002 6:35 pm
Location: Tsjakamaka
Contact:
Post
by mortician » Fri May 30, 2003 4:58 pm
someonesNickName will also be in the variable $text ..
make a list of $text ( [ split $text ] ) and use lindex ... [lindex $text 0] is the first token (should be op), [lindex $text 1] the second token (the nick ...)
It is a mistake to think you can solve any major problems just with potatoes.
Storm
Voice
Posts: 36 Joined: Fri Apr 25, 2003 12:59 am
Location: Vancouver, Canada
Post
by Storm » Fri May 30, 2003 7:10 pm
mortician wrote: someonesNickName will also be in the variable $text ..
make a list of $text ( [ split $text ] ) and use lindex ... [lindex $text 0] is the first token (should be op), [lindex $text 1] the second token (the nick ...)
Hmm... well, could u show the code?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat May 31, 2003 2:23 am
Code: Select all
if {[lindex [split $text] 0] == "op" } {
Once the game is over, the king and the pawn go back in the same box.
Storm
Voice
Posts: 36 Joined: Fri Apr 25, 2003 12:59 am
Location: Vancouver, Canada
Post
by Storm » Sat May 31, 2003 2:41 am
Ok, thanks I'll try it now.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat May 31, 2003 3:05 am
Code: Select all
bind CTCP - ACTION act:cmds
proc act:cmds { nick host handle chan keyword text } {
if {[lindex [split $text] 0] != "op" || ![botisop $chan]} {
return
}
set who [lindex [split $text] 1]
if {$who == ""} {
putserv "MODE $chan +o $nick"
return
}
if {![onchan $who $chan]} {
return
}
putserv "MODE $chan +o $who
}
Once the game is over, the king and the pawn go back in the same box.
Storm
Voice
Posts: 36 Joined: Fri Apr 25, 2003 12:59 am
Location: Vancouver, Canada
Post
by Storm » Sat May 31, 2003 3:12 am
Thanks a lot
!!!
It works