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.

channel message

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
p
paulOr
Voice
Posts: 10
Joined: Sat Nov 01, 2008 10:32 am

channel message

Post by paulOr »

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?
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Code: Select all

# 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
Post Reply