egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

superbitch.tcl with on / off switch

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
darkwingduck
Voice


Joined: 16 Jun 2007
Posts: 5

PostPosted: Sun Jun 17, 2007 3:43 pm    Post subject: superbitch.tcl with on / off switch Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Jan 06, 2008 1:02 am    Post subject: Reply with quote

This can be viewed as a future feature request for the author, slennox. Very Happy
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
arcADE
Voice


Joined: 04 Feb 2006
Posts: 7
Location: /dev/zero

PostPosted: Tue Jan 08, 2008 5:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber