| View previous topic :: View next topic |
| Author |
Message |
slowpoke23 Voice
Joined: 10 Feb 2013 Posts: 5
|
Posted: Tue Feb 26, 2013 3:58 am Post subject: !msg script |
|
|
Hi
lets say i have this script
| Code: | bind pub n !msg s_msg2
proc s_msg2 {nick uhost hand chan arg} {
global botnick
putserv "PRIVMSG $chan : $arg"
}
|
How can I make it message the channel OR the nickname
!msg #chan test
!msg nick test
:S |
|
| Back to top |
|
 |
dirty Halfop
Joined: 08 Feb 2013 Posts: 40 Location: Romania
|
Posted: Tue Feb 26, 2013 4:31 am Post subject: |
|
|
this way:
| Code: |
bind pub n !msg s_msg2
proc s_msg2 {nick uhost hand chan text} {
set where [lindex [join $text] 0]
set what [join [lrange [split $text] 1 end]]
putserv "PRIVMSG $where : $what"
}
|
_________________ come to the dark side.. I have cookies!
WwW.BotZone.TK |
|
| Back to top |
|
 |
|