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 

Clearing All Bans After 3 Hours!

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


Joined: 26 Jun 2012
Posts: 49
Location: root@localhost

PostPosted: Sun Jul 07, 2013 10:23 am    Post subject: Clearing All Bans After 3 Hours! Reply with quote

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 Smile
_________________
The Road To Hell Is Full Of Good Intentions
Back to top
View user's profile Send private message Visit poster's website
Sane
Voice


Joined: 17 Nov 2013
Posts: 19
Location: #kl-channel@Rizon.net

PostPosted: Sun Nov 17, 2013 2:56 am    Post subject: Re: Clearing All Bans After 3 Hours! Reply with quote

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:
# 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)"
Back to top
View user's profile Send private message
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