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 edit to kickmode

Old posts that have not been replied to for several years.
Locked
V
Volume
Halfop
Posts: 84
Joined: Fri May 23, 2003 5:08 am

Superbitch.tcl edit to kickmode

Post by Volume »

hello, i have edit superbitch.tcl to kick user they oping other and this user ho get op became kick to.
but wen a user the is not add op a bot or some bots the bots kick add bots to. ther must a bot identify in the script.. but i cant help me.


superbitch.tcl modified to kick but add bots became kick to wenn a user they have not the flags for opping... :( and ops bots (exemple open a new chan and the user is not yet add as chanmaster)

Problem Bots kick Bots the User is not add!

* User sets mode: +oo Bot1 Bot2
* User sets mode: +ooo Bot4 Comodore Domian
* Bot4 was kicked by Bot2 (cya)
* Bot1 sets mode: +o Bot3
* You were kicked by Bot2 (no handop!)
* Attempting to rejoin channel #firlefanz
* Rejoined channel #firlefanz
* Topic is 'hello'
* Set by siegfried!nix@ko.org on Sat Jul 26
* Bot1 sets mode: +o Bot5
* Comodore was kicked by Bot2 (cya)
* Domian was kicked by Bot2 (cya)

all bots have +bfoHNSU Flags global

Code: Select all

# netbots.tcl v4.09 (1 April 2002)
# Copyright 1998-2002 by slennox
# slennox's eggdrop page - 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]} {
            putkick $chan $opped "cya"
            putkick $chan $nick "no handop!"
            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])))} {
            putkick $chan $opped "cya"
            putkick $chan $nick "no handop!"
            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)))} {
        putkick $chan $opped "cya"
        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.09.0"
netset.tcl settings for superbitch:

Code: Select all

# superbitch.tcl settings
set nb_component(superbitch) 1
set sb_chans ""
set sb_canop "o|o"
set sb_canopflags "o|o"
set sb_canopany "bmn|mn"
set sb_remove 1
set sb_note "owner1 owner2"
set sb_checkop 1
Locked