Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


[script] Anti Idle par Progeny
#1
Voici la source d'un petit script anti-idle trouvé sur egghelp.org:

tcl
### Anti-Idle v1.2
### by Progeny <progeny@azzurra.org>
### irc.azzurra.org - #EggHelp
 
# - Using -
# Type in partyline:
# .chanset #channel maxidle <time in minutes>
# If set 0 channel's check will be ignored.
 
# Punishing method (1 = Kick, 2 = Kick/Ban)
set pmethod 2
# Ban time in minutes.
set bantime 5
# Kick's reason
set aidlereason "E` vietato sostare per piu` di %idletime minuti nel canale."
# Exception's flags
set flags f|f
# Kick op? (0 = Yes, 1 = No)
set kickop 1
# Kick voice? (0 = Yes, 1 = No)
set kickvoice 1
#Check for idling users every minutes.
bind time - * aidle:checkidle
 
setudef int maxidle
 
proc aidle:checkidle { min hour day month year } {
global botnick flags kickop kickvoice
    foreach chan [channels] {
        if {![channel get $chan "maxidle"]} {continue}
        foreach nick [chanlist $chan] {
            if {$nick == $botnick} {continue}
            if {([isop $nick $chan]) && ($kickop)} {continue}
            if {([isvoice $nick $chan]) && ($kickvoice)} {continue}
            if {[matchattr [nick2hand $nick] $flags] == 1} {continue}
            if {[getchanidle $nick $chan] > [channel get $chan "maxidle"]} {
            aidle:punish $chan $nick [channel get $chan "maxidle"]
            }
        }
 
    }
}
 
proc aidle:punish { channel nick idletime } {
global pmethod aidlereason bantime
regsub -all "%idletime" $aidlereason $idletime aidlereason
    switch $pmethod {
    1 { putserv "KICK $channel $nick :$aidlereason" }
    2 { newchanban $channel "*![getchanhost $nick]" "Anti-Idle" "Too idle" $bantime }
    }
}
 
putlog "Anti-Idle v1.2 loaded"


Je pense que ça peut en aider certains ici ;)
irc.zeolia.net - Offrez-moi un café
Merci de ne pas demander d'aide en MP
Away


Messages In This Thread
[script] Anti Idle par Progeny - by CrazyCat - 18/11/2007, 17:59
RE: Anti Idle - by Babytigrou16 - 26/11/2007, 07:08
RE: Anti Idle - by CrazyCat - 26/11/2007, 10:06
Le tcl Anti-Idle modifié - by Babytigrou16 - 27/01/2008, 21:19
RE: Anti Idle par Progeny - by NuNuX - 28/01/2008, 08:42
RE: Anti Idle par Progeny - by Babytigrou16 - 02/02/2008, 18:16
RE: Anti Idle par Progeny - by NuNuX - 03/02/2008, 10:39
RE: Anti Idle par Progeny - by Babytigrou16 - 03/02/2008, 17:53
RE: Anti Idle par Progeny - by NuNuX - 03/02/2008, 18:51
RE: Anti Idle par Progeny - by Babytigrou16 - 05/02/2008, 04:05
RE: Anti Idle par Progeny - by NuNuX - 05/02/2008, 09:31
RE: Anti Idle par Progeny - by CrazyCat - 05/02/2008, 10:29
RE: Anti Idle par Progeny - by bewess - 28/08/2008, 11:26

Possibly Related Threads…
Thread Author Replies Views Last Post
  [script] Roulette Anti-boulets v1.5.0 Artix 1 3,480 01/09/2009, 15:24
Last Post: Artix

Forum Jump:


Users browsing this thread: 1 Guest(s)