I need some support on a issue I`m having...
I want to make a code with some public commands like "save", "rehash", "restart", "chattr" and stuff like that but I need to make those commands to be called in to a specifig botnick...
I have several bot's on a channel ( 6 or 7 of them ) and I wan't to create a code that will responde if I call on of the bots nickname... so that I`ll manage them more easily... something like this
What should I bind in the code ? PUBM or PUB ?(08:14) <me> |egg .msg
(08:14) -|egg- SYNTAX: .msg <nick> [text]
(08:14) <me> |egg .msg Q auth
(08:14) -|egg- Sent message to Q
I`ve tried bouth of them and the results are not what I`m wanting...
Here's a example of what I`m trying to do:
Code: Select all
bind pubm n .msg do:msg
proc do:msg {nick uhost hand chan text} {
if {[matchattr $hand n|N $chan]} {
if {![isbotnick $nick]} {
set who [lindex [split $text] 0]
set txt [lrange $text 1 end]
if {$who == ""} {
puthelp "NOTICE $nick :SYNTAX:\002 .msg <nick> \[text\] \002"
return 0
}
if {$txt != ""} {
putquick "PRIVMSG $who :$txt "
} else {
putserv "NOTICE $nick :SYNTAX:\002 .msg $who \[text\] \002"
}
}
}
}
Waiting for some support/ideas from you guys.
Thanks