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.

command

Old posts that have not been replied to for several years.
Locked
User avatar
NoFear
Halfop
Posts: 46
Joined: Wed Sep 10, 2003 8:36 am
Location: cW

command

Post by NoFear »

Ok, i have one question. i have tcl script and i can just set channels in that tcl like "#chan1 #chan2", but i want to set channels in eggdrop dcc chat (.netchanset #chan1 +script) can you please help me with this? thanks for help
Way Away From Here..
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Can you be a lil more specific on what you want to say/do?
Once the game is over, the king and the pawn go back in the same box.
User avatar
NoFear
Halfop
Posts: 46
Joined: Wed Sep 10, 2003 8:36 am
Location: cW

Post by NoFear »

sure.
# Specify the list of channels to activate superbitch on.
set sb_chans "#H-Town"
# Valid settings: one channel like "#donkeys", a list of channels like
# "#donkeys #cows #pigs", or "" to activate on all channels.
i can set channels that superbitch will work only in the file.. i would like to set channels in bot dcc chat. and if i type .netchanset #chan1 +superbitch then this superbitch script will work on that channel.. but i don't know how to do this;(
Way Away From Here..
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

By using user defined channel flags.

Example: Put "setudef flag superbitch" outside your proc in that tcl file and "if {![channel get $chan superbitch]} { return }" inside your proc as an check for that specific channel flag. If it is enabled then continue with the proc, else return.
Once the game is over, the king and the pawn go back in the same box.
User avatar
NoFear
Halfop
Posts: 46
Joined: Wed Sep 10, 2003 8:36 am
Location: cW

Post by NoFear »

i just don't understand this.. sorry

Code: Select all

# superbitch.tcl v2.0 (4 June 2000)
# copyright (c) 1998-2000 by slennox <slennox@egghelp.org>
# slennox's eggdrop page - http://www.egghelp.org/
#
# This script provides an enhanced bitch mode. It deops both the user who
# was opped and the user who performed the disallowed op. It is very useful
# for protecting the channel from gullible ops who accidentally op someone
# they shouldn't, or from ops who use exploitable clients/scripts and may
# unintentionally op someone via an exploit (e.g. CTCPREPLY backdoor). The
# script doesn't completely replace eggdrop's +bitch channel mode - you may
# still wish to use that in conjunction with superbitch.tcl.
#
# Note: superbitch.tcl may not function correctly on eggdrop 1.4.0-1.4.1
# due to a pushmode bug in those versions of eggdrop. The problem is fixed
# in 1.4.2 and later. 1.3.x bots are not affected by this problem.
#
# v2.0 - New standalone release. Contains refinements and features from the
#        netbots.tcl version of superbitch.tcl.

# Specify the list of channels to activate superbitch on.
set sb_chans "#H-Town"
# Valid settings: one channel like "#donkeys", a list of channels like
# "#donkeys #cows #pigs", or "" to activate on all channels.

# The flags for users who are allowed to give op to users with the flags
# specified in sb_canopflags.
set sb_canop "nb|-"
# Valid settings: set in globalflags|chanflags format (e.g. "m|m" means
# global OR channel master, "m|-" means global masters only), or set to ""
# to specify that no users are allowed to op.

# The flags for users who are allowed to be opped by users with an sb_canop
# flag.
set sb_canopflags "nb|-"
# Valid settings: set in globalflags|chanflags format (e.g. "m|m" means
# global OR channel master, "m|-" means global masters only), or set to ""
# to specify that no users are allowed to be opped.

# The flags for users who are allowed to give op to anyone. This setting
# ignores sb_canop and sb_canopflags (e.g. you can set sb_canop to "" but
# users with flags specified in sb_canopany will still be allowed to op
# anyone).
set sb_canopany "nb|-"
# Valid settings: set in globalflags|chanflags format (e.g. "m|m" means
# global OR channel master, "m|-" means global masters only), or set to ""
# to specify that no users have the 'can op anyone' privilege.

# If a user ops someone they shouldn't, remove their global & channel +o
# status and give them the +d flag? (note that +m/n is not removed).
set sb_remove 0
# Valid settings: 1 to enable, 0 to disable.

# List of users to send a note to if a user's +o status is removed by
# superbitch.tcl.
set sb_note "NoFear Dejo"
# Valid settings: one user like "Tom", a list of users like
# "Tom Dick Harry", or "" to specify that no notes are sent.

# Make the bot double-check who it opped after opping a nick, reversing the
# op if the opped user doesn't match +o? This was mainly designed to help
# prevent 'op cheating', but I haven't tested it for that so I'm not sure
# if it's actually effective.
set sb_checkop 0
# Valid settings: 1 to enable, 0 to disable.

setudef flag superbitch

# Don't edit below unless you know what you're doing.

if {$numversion < 1040200} {
  if {[info commands isop] != ""} {
    proc wasop {nick chan} {
      return [isop $nick $chan]
    }
  }
}

proc sb_bitch {nick uhost hand chan mode opped} {
 if {![channel get $chan superbitch]} { return }
  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]))} {
            putquick "KICK $chan $opped :Permission Denied"
            putquick "KICK $chan $nick :Permission Denied"
            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])))} {
             putquick "KICK $chan $opped :Permission Denied" 
             putquick "KICK $chan $nick :Permission Denied"
            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]))} {
        putquick "KICK $chan $opped :Permission Denied"
        putlog "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

putlog "Loaded superbitch.tcl v2.0 by slennox"

return

it looks like this.. can you please change this code so that will work? :oops: :( :cry: :cry:
Way Away From Here..
Locked