Hi
How can i get eggdrop to catch onotice's
Ive tried the standard notc bind but it doesnt seem to register anything. I also looked through the irc rfc and i couldnt see any numerics relating to op notices.
thanks
Simon
Code: Select all
#set the flags of who can use opnotice/opmessage.
set opnoteflag "n"
# Set the op-notice command here.
set opnotice_setting(onotice) "onot"
# Set the op-msg command here.
set opnotice_setting(omsg) "omsg"
# Does your network support /notice @#channel?
set opnotice_setting(chantarg) 1
# Enable use of bold in DCC chat?
set opnotice_setting(bold) 1
# Prefix "OPNOTICE:" in DCC chat messages?
set opnotice_setting(OPNOTICE:) 1
proc opnotice_dopre {} {
if {!$::opnotice_setting(OPNOTICE:)} { return "" }
if {!$::opnotice_setting(bold)} { return "OPNOTICE: " }
return "\002OPNOTICE:\002 "
}
proc opnotice_onotice {hand idx text} {
if {[string compare [join [lrange [split $text] 1 1]] ""] == 0} { putdcc $idx "[opnotice_dopre]Usage: .$::opnotice_setting(onotice) <channel> <message>" ; return }
if {![matchattr $hand o|o [set chan [join [lrange [split $text] 0 0]]]]} { putdcc $idx "What? You need '.help'" ; return }
if {![botisop $chan] && ![matchattr $hand +n]} { putdcc $idx "[opnotice_dopre]I do not have ops on $chan, and you do not have access to override." ; return }
putdcc $idx "[opnotice_dopre][set data "[join [lrange [split $text] 1 end]]"]"
if {$::opnotice_setting(chantarg)} { putserv "NOTICE @$chan :$data" ; return }
foreach o [chanlist $chan] {
if {[isop $o $chan] && ![isbotnick $o]} { putserv "NOTICE $o :$data" }
}
}
proc opnotice_omsg {hand idx text} {
if {[string compare [join [lrange [split $text] 1 1]] ""] == 0} { putdcc $idx "[opnotice_dopre]Usage: .$::opnotice_setting(omsg) <channel> <message>" ; return }
if {![matchattr $hand o|o [set chan [lindex [split $text] 0]]]} { putdcc $idx "What? You need '.help'" ; return }
if {![botisop $chan] && ![matchattr $hand +n]} { putdcc $idx "[opnotice_dopre]I do not have ops on $chan, and you do not have access to override." ; return }
putdcc $idx "[opnotice_dopre][set data "[join [lrange [split $text] 1 end]]"]"
foreach o [chanlist $chan] {
if {[isop $o $chan] && ![isbotnick $o]} { putserv "PRIVMSG $o :$data" }
}
}
bind dcc $opnoteflag $opnotice_setting(onotice) opnotice_onotice
bind dcc $opnoteflag $opnotice_setting(omsg) opnotice_omsg