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.

onotice

Old posts that have not been replied to for several years.
Locked
s
simonbell
Halfop
Posts: 68
Joined: Mon Aug 05, 2002 8:07 pm
Location: Washington, England
Contact:

onotice

Post by simonbell »

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
d
dvV
Voice
Posts: 30
Joined: Wed Jan 29, 2003 4:08 pm

Post by dvV »

op notices are just regular notices actually i have been using this nice script by Wcc for some time...

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
dvV
Locked