| View previous topic :: View next topic |
| Author |
Message |
paulOr Voice
Joined: 01 Nov 2008 Posts: 10
|
Posted: Thu Apr 23, 2009 3:01 pm Post subject: channel message |
|
|
Im looking for a script that will display a certain message in a channel on command, however i only want it to work on 1 channel, and no other channels the bot is in.
anyone got something like that? |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Thu Apr 23, 2009 6:45 pm Post subject: |
|
|
| Code: |
# set here the single channel name for output (or a space delimited string of channel names)
set vMsgChannels "#whatever"
# set here the command to output a message
set vMsgCommand !msg
# set here the message to output
set vMsgText "this is what I want to output on command"
bind PUB - $vMsgCommand pMsgProc
proc pMsgProc {nick uhost hand channel txt} {
global vMsgChannels vMsgText
if {[lsearch -exact [split [string tolower $vMsgChannels]] [string tolower $channel]] != -1} {
putserv "PRIVMSG $channel :$vMsgText"
}
return 0
}
|
_________________ I must have had nothing to do |
|
| Back to top |
|
 |
|