egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

channel message

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
paulOr
Voice


Joined: 01 Nov 2008
Posts: 10

PostPosted: Thu Apr 23, 2009 3:01 pm    Post subject: channel message Reply with quote

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
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu Apr 23, 2009 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber