| View previous topic :: View next topic |
| Author |
Message |
darkwingduck Voice
Joined: 16 Jun 2007 Posts: 5
|
Posted: Sun Jun 17, 2007 3:43 pm Post subject: superbitch.tcl with on / off switch |
|
|
hello,
can somebody help me to change superbitch.tcl.
i need a switch in the .chanset options to turn off it.
i mean: .netchanset #channel -superbitch
The standard setting must be on.
here is the script:
| Code: |
# netbots.tcl v4.10 (8 August 2005)
# Copyright 1998-2005 by slennox
# http://www.egghelp.org/
## superbitch.tcl component script ##
proc sb_bitch {nick uhost hand chan mode opped} {
global botnick sb_chans sb_canop sb_canopany sb_canopflags sb_checkop sb_note sb_remove
if {$mode == "+o"} {
if {$nick != $botnick} {
if {(($opped != $botnick) && ($nick != $opped) && ([onchan $nick $chan]) && (![wasop $opped $chan]) && (($sb_chans == "") || ([lsearch -exact $sb_chans [string tolower $chan]] != -1)))} {
if {![matchattr [nick2hand $opped $chan] $sb_canopflags $chan]} {
if {$sb_canopany == "" || ![matchattr $hand $sb_canopany $chan]} {
pushmode $chan -o $opped
pushmode $chan -o $nick
if {$sb_remove && [validuser $hand] && [matchattr $hand o|o $chan]} {
chattr $hand -o+d|-o+d $chan
if {[info commands sendnote] != ""} {
foreach recipient $sb_note {
if {[validuser $recipient]} {
sendnote SUPERBITCH $recipient "Removed +o from $hand (opped $opped on $chan)"
}
}
}
}
}
} else {
if {((($sb_canopany == "") || (![matchattr $hand $sb_canopany $chan])) && (($sb_canop == "") || (![matchattr $hand $sb_canop $chan])))} {
pushmode $chan -o $opped
pushmode $chan -o $nick
if {$sb_remove && [validuser $hand] && [matchattr $hand o|o $chan]} {
chattr $hand -o+d|-o+d $chan
if {[info commands sendnote] != ""} {
foreach recipient $sb_note {
if {[validuser $recipient]} {
sendnote SUPERBITCH $recipient "Removed +o from $hand (opped $opped on $chan)"
}
}
}
}
}
}
}
} else {
if {(($sb_checkop) && (![matchattr [nick2hand $opped $chan] o|o $chan]) && (($sb_chans == "") || ([lsearch -exact $sb_chans [string tolower $chan]] != -1)))} {
pushmode $chan -o $opped
putlog "superbitch: opped non +o user $opped on $chan - reversing."
nb_sendcmd * rbroadcast "superbitch: opped non +o user $opped on $chan - reversing."
}
}
}
return 0
}
set sb_chans [split [string tolower $sb_chans]] ; set sb_note [split $sb_note]
bind mode - * sb_bitch
return "nb_info 4.10.0"
|
thank you very much for help. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Jan 06, 2008 1:02 am Post subject: |
|
|
This can be viewed as a future feature request for the author, slennox.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
arcADE Voice
Joined: 04 Feb 2006 Posts: 7 Location: /dev/zero
|
Posted: Tue Jan 08, 2008 5:42 am Post subject: |
|
|
here is a simple solution.
add this to your eggdrop.conf
| Code: |
setudef flag superbitch
|
now change this line
| Code: |
if {(($opped != $botnick) && ($nick != $opped) && ([onchan $nick $chan]) && (![wasop $opped $chan]) && (($sb_chans == "") || ([lsearch -exact $sb_chans [string tolower $chan]] != -1)))} {
|
to this
| Code: |
if {(($opped != $botnick) && ($nick != $opped) && ([onchan $nick $chan]) && (![wasop $opped $chan]) && [channel get $chan superbitch])} {
|
this should make the superbitch channel flag available to the .chanset dcc command and also make the script check if the channel is set as +superbitch when executing the proc. About the .netchanset command well since I do not have the code I can not implement it but if it works as I think it works you will be able to use it. _________________ keep IT reaL |
|
| Back to top |
|
 |
|