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.

superbitch.tcl with on / off switch

Support & discussion of released scripts, and announcements of new releases.
Post Reply
d
darkwingduck
Voice
Posts: 5
Joined: Sat Jun 16, 2007 8:49 am

superbitch.tcl with on / off switch

Post by darkwingduck »

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: Select all

# 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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

This can be viewed as a future feature request for the author, slennox. :D
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
a
arcADE
Voice
Posts: 7
Joined: Sat Feb 04, 2006 3:50 pm
Location: /dev/zero
Contact:

Post by arcADE »

here is a simple solution.

add this to your eggdrop.conf

Code: Select all

setudef flag superbitch
now change this line

Code: Select all

if {(($opped != $botnick) && ($nick != $opped) && ([onchan $nick $chan]) && (![wasop $opped $chan]) && (($sb_chans == "") || ([lsearch -exact $sb_chans [string tolower $chan]] != -1)))} {
to this

Code: Select all

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
Post Reply