Clearing All Bans After 3 Hours!

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
H
Hero
Halfop
Posts: 49
Joined: Tue Jun 26, 2012 6:27 pm
Location: root@localhost
Contact:

Clearing All Bans After 3 Hours!

Post by Hero »

Hello I Need Tcl Which Remove All Channel Bans After 3 Hours!l
But It First It Announce In Channel Like:
* @Bot Clearing 3 Hours Old Bans
and then remove all bans
Waiting For Script Thanks :)
The Road To Hell Is Full Of Good Intentions
S
Sane
Voice
Posts: 19
Joined: Sun Nov 17, 2013 12:38 am
Location: #kl-channel@Rizon.net

Re: Clearing All Bans After 3 Hours!

Post by Sane »

Hero wrote:Hello I Need Tcl Which Remove All Channel Bans After 3 Hours!l
But It First It Announce In Channel Like:
* @Bot Clearing 3 Hours Old Bans
and then remove all bans
Waiting For Script Thanks :)
The script I'm about to post is an edit of the: # RemoveBans.tcl by Nils Ostbjerg <shorty@business.auc.dk>
# (C) Copyright (2001)

Code: Select all

# RemoveBans.tcl by Nils Ostbjerg <shorty@business.auc.dk>
# (C) Copyright (2001)
#
# This script makes the bot remove all bans set on a channel that has the flag +removebans once every 15 minutes; which you can change, 15 minutes is just the default. Edit the bind time below.
#
#  This version of the RemoveBans script is tested on Eggdrop version
#  1.6.x
#
#  Please report any bugs to me at shorty@business.auc.dk.
#  Idea and suggestion to new features are also welcome.
#
#
# This is an edited version by Sane from irc.rizon.net #kl-channel with the help of arfer from irc.dal.net #tcl & #eggdrop.
# The changes are as follows: edited the script so it isn't on globally anymore, now you can set what channels you want the script to be enabled on by typing .chanset #ChannelName +removebans (or just .chanset +removebans if it's your main channel) into the partyline, the script will only remove a channels bans after X minutes if that channel has the flag +removebans, if a channel has the flag -removebans; the bans will NOT be removed after X minutes. To check what flags a channel has type: .chaninfo #ChannelName (or just .chaninfo if it's your main channel) into the partyline. ( There were other edits but I've forgotten what they were... :/ )
#
# I have left all original credits.
# 
# RemoveBans.tcl by Nils Ostbjerg | edit by Sane with help from arfer.
# (C) Copyright (2012)
#
#
#
#
#                                 - Nils Ostbjerg <shorty@business.auc.dk>
#
#  Version 1.6.0 - 01 Nov 2001  First version, should work ok. 
#                                  - Nils Ostbjerg <shorty@business.auc.dk>


bind time - "180 * * * *" time:removebans


##########################################################################
# time:RemoveBans start                                                  #
##########################################################################


proc time:removebans { minute hour day month year } {
  foreach chan [channels] {
    if {[channel get $chan removebans]} {
putserv "PRIVMSG $chan :Clearing 3 Hour Old Bans "
       resetbans $chan
     }
  }
  return 0
}
setudef flag removebans


##########################################################################
# time:RemoveBans end                                                    #
##########################################################################


##########################################################################
# putlog                                                                 #
##########################################################################


putlog "Loaded RemoveBans (DLF)"
Post Reply