| View previous topic :: View next topic |
| Author |
Message |
h22turbo Voice
Joined: 04 Jul 2011 Posts: 4
|
Posted: Wed Nov 07, 2012 2:29 am Post subject: Simple !clearbans script [SOLVED] |
|
|
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 |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Wed Nov 07, 2012 4:45 am Post subject: |
|
|
| 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 |
|
 |
h22turbo Voice
Joined: 04 Jul 2011 Posts: 4
|
Posted: Wed Nov 07, 2012 5:38 am Post subject: |
|
|
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 |
|
 |
Get_A_Fix Master

Joined: 07 May 2005 Posts: 206 Location: New Zealand
|
Posted: Fri Nov 09, 2012 10:23 am Post subject: |
|
|
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 |
|
 |
|