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 

Simple !clearbans script [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
h22turbo
Voice


Joined: 04 Jul 2011
Posts: 4

PostPosted: Wed Nov 07, 2012 2:29 am    Post subject: Simple !clearbans script [SOLVED] Reply with quote

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
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Wed Nov 07, 2012 4:45 am    Post subject: Reply with quote

Code:
# 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.
Back to top
View user's profile Send private message Visit poster's website
h22turbo
Voice


Joined: 04 Jul 2011
Posts: 4

PostPosted: Wed Nov 07, 2012 5:38 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Fri Nov 09, 2012 10:23 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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