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.

aidle and Unreal

Old posts that have not been replied to for several years.
Locked
b
byte
Voice
Posts: 9
Joined: Sat Jul 23, 2005 6:38 am

aidle and Unreal

Post by byte »

hello, i use this anti idle script for my chan , and exclude op, halfop and voice but the tcl don't detect founder ~ and sop & and kickban this, 1 solution ?

Code: Select all

### GLOBALS ###
set exclude(op) 1
set exclude(halfop) 1
set exclude(voice) 1

set ban(type) 3
set ban(time) 10
set ban(reason) "Ban temporaneo di %BAN minuti"

set notice(msg) "Vietato sostare su %CHAN per più di %IDLE minuti"
### END GLOBALS ###

### FLAGS ###
setudef int max_idle
### END FLAGS###

### BINDS ###
bind time - "* * * * *" idle:check
### END BINDS ###

### PROCS ###
proc idle:check { hour min day month year } {
	foreach chan [ channels ] {
		idle:scan ${chan}
	}
}

proc idle:scan { chan } {
	set max [ channel get ${chan} max_idle ]
	if { ${max} > 0 } {
		foreach nick [ chanlist ${chan} ] {
			if { [ isop ${nick} ${chan} ] && $::exclude(op) != 0 } {
				continue
			}
			if { [ ishalfop ${nick} ${chan} ] && $::exclude(halfop) != 0 } {
				continue
			}
			if { [ isvoice ${nick} ${chan} ] && $::exclude(voice) != 0 } {
				continue
			}

			if { [ getchanidle ${nick} ${chan} ] >= ${max} } {
				set kickmsg [ var:replace $::ban(reason) "%BAN" "$::ban(time)" ]
				set noticemsg [ var:replace [ var:replace $::notice(msg) "%CHAN" "${chan}" ] "%IDLE" "${max}" ]
				set mask [ address "${nick}![ getchanhost ${nick} ${chan} ]" $::ban(type) ]

				if { [ isop ${nick} ${chan} ] } {
					putquick "MODE ${chan} -o+b ${nick} ${mask}"
				} elseif { [ ishalfop ${nick} ${chan} ] } {
					putquick "MODE ${chan} -h+b ${nick} ${mask}"
				} else {
					putquick "MODE ${chan} +b ${mask}"
				}

				if { ${kickmsg} != "" } {
					putquick "KICK ${chan} ${nick} :${kickmsg}"
				} else {
					putquick "KICK ${chan} ${nick} :Ban temporaneo di ${max} minuti"
				}

				if { ${noticemsg} != "" } {
					putquick "NOTICE ${nick} :${noticemsg}"
				}

				timer $::ban(time) "ban:remove ${chan} ${mask}"
			}
		}
	}
}

proc ban:remove { chan mask } {
	putquick "MODE ${chan} -b ${mask}"
}

proc var:replace { line var value } {
	regsub -- "$var" $line "$value" line
	return $line
}

proc address { mask type } {
	set nick [ lindex [ split ${mask} "!" ] 0 ]
	set ident [ lindex [ split [ lindex [ split ${mask} "!" ] 1 ] "@" ] 0 ]
	set host [ lindex [ split ${mask} "@" ] 1 ]
	set domain [ lindex [ split [ maskhost ${mask} ] "@" ] 1 ]
	switch  -- ${type} {
		0 { return "*!${ident}@${host}" }
		1 { return "*!*${ident}@${host}" }
		2 { return "*!*@${host}" }
		3 { return "*!*${ident}@${domain}" }
		4 { return "*!*@${domain}" }
		5 { return "${nick}!${ident}@${host}" }
		6 { return "${nick}!*${ident}@${host}" }
		7 { return "${nick}!*@${host}" }
		8 { return "${nick}!*${ident}@${domain}" }
		9 { return "${nick}!*@${domain}" }
	}
}
### END PROCS ###

### INITIAL ###
if { $ban(time) < 1} {
	set ban(time) 10
}
if { $ban(type) < 0 || $ban(type) > 9 } {
	set ban(type) 2
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

In your .conf file
set opchars "@&~"
b
byte
Voice
Posts: 9
Joined: Sat Jul 23, 2005 6:38 am

Post by byte »

yes, i add set opchars "@&~" but i have the same problem :?
Locked