This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Help Aidle script

Help for those learning Tcl or writing their own scripts.
Post Reply
J
Jailmann
Voice
Posts: 33
Joined: Fri Apr 09, 2004 2:50 pm

Help Aidle script

Post by Jailmann »

Hello

i have found a script but there somting there need to be change to it because i use som other mode on mirc irc so anyone can help me

i have these ! = owner and * = protect @ and % half op and +v voice

I need these thing to be add ind the script i have try but couldent find out how to....

The script is this .....
### 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"

I have try to do thins but it dosent work .... need help
### 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 1
# Kick's reason
set aidlereason "E` vietato sostare per piu` di %idletime minuti nel canale."
# Exception's flags
set flags f|f
# Kick owner? (0 = Yes, 1 = No)
set kickowner 1
# Kick protect? (0 = Yes, 1 = No)
set kickprotect 1
# Kick op? (0 = Yes, 1 = No)
set kickop 1
# Kick halfop? (0 = Yes, 1 = No)
set kickhalfop 1
# Kick voice? (0 = Yes, 1 = No)
set kickvoice 0
#Check for idling users every minutes.
bind time - * aidle:checkidle

setudef int maxidle

proc aidle:checkidle { min hour day month year } {
global botnick flags kickowner kickprotect kickop halfop kickvoice
foreach chan [channels] {
if {![channel get $chan "maxidle"]} {continue}
foreach nick [chanlist $chan] {
if {$nick == $botnick} {continue}
if {([isowner $nick $chan]) && ($kickowner)} {continue}
if {([isprotect $nick $chan]) && ($kickprotect)} {continue}
if {([isop $nick $chan]) && ($kickop)} {continue}
if {([ishalfop $nick $chan]) && ($kickphalfop)} {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"
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply