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.

Simple !clearbans script [SOLVED]

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
h
h22turbo
Voice
Posts: 4
Joined: Mon Jul 04, 2011 4:45 am

Simple !clearbans script [SOLVED]

Post by h22turbo »

I need a script that allows a bot op (flags o|o or whatever) to be able to type !clearbans in a channel, and the bot will clear the internal ban list.

I use Eggdrop v1.6.21 and NetBots v4.10 with the sentinel component enabled.

It has a DCC command of .clearbans -all , but i need a simple script that will do .clearbans -all when a o|o users types !clearbans in the channel.

Can anyone help me please?

Thanks in advance!
Last edited by h22turbo on Wed Nov 07, 2012 5:49 am, edited 1 time in total.
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

Code: Select all

# Author: tomekk
# e-mail:  tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html

##############################################################
bind pub o|o !clearbans cb

proc cb { nick uhost hand chan arg } {
        foreach global_ban [banlist] {
                killban [lindex $global_ban 0]
        }
    
        foreach chan_ban [channels] {
                foreach ban [banlist $chan_ban] {
                        killchanban $chan_ban [lindex $ban 0]
                }
        }
}

putlog "cb.tcl ver 0.1 by tomekk loaded"
Load and check it please (i didn't test it), will work without any other scripts.
h
h22turbo
Voice
Posts: 4
Joined: Mon Jul 04, 2011 4:45 am

Post by h22turbo »

thank you so much!


* InSaNe sets ban on *!*@5401a636.d38927c4.86566c49.ip
* InSaNe has kicked Awaken from #channel (multiple repeat floods)
<@h22turbo> !clearbans
* InSaNe removes ban on *!*@5401a636.d38927c4.86566c49.ip

works like a champ!
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

What about one just for normal server bans? 367 is the RAW for bans, 368 ending list.

Also, with the above code for internal bans, there may be some (like a DNR *Do Not Remove* tag/reason) that should be left on the bot, where others can be removed with the !clearbans - I'm not sure how to set an exempt list, either as a var and call it, or in the command itself. This is just something I'd personally do/use, I'm not saying everyone would like it.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Post Reply