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 

!msg script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
slowpoke23
Voice


Joined: 10 Feb 2013
Posts: 5

PostPosted: Tue Feb 26, 2013 3:58 am    Post subject: !msg script Reply with quote

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


Joined: 08 Feb 2013
Posts: 40
Location: Romania

PostPosted: Tue Feb 26, 2013 4:31 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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