⌠06:18:46 PM⌡ 「@admin」 .gline bandido
⌠06:18:48 PM⌡ 「@F」 admin - NO/Invalid IP pattern. USAGE: !gline 193.193.193.193
⌠06:19:14 PM⌡ 「@admin」 .gline 2806a:7699:e094:f36d:6b6c:7a23
⌠06:19:15 PM⌡ 「@F」 admin - NO/Invalid IP pattern. USAGE: !gline 193.193.193.193
Code: Select all
#### ++++ Author: MadaliN <madalinmen28@yahoo.com>
### +++ Website: www.Ascenture.ro
## +++ TCL Name: GLine
# +++ Version: 1.0
## ++++
# Commands:
# !gline 45.432.12.1
#
# For the command to work you need to have VOICE or OP in the main channel
#
bind PUBM - * gline:main
set temp(trigger) {! . `}
proc gline:main {nick uhost hand chan arg} {
global temp
if {[string index $arg 0] in $temp(trigger)} {
set temp(cmd) [string range $arg 1 end]
set temp(cmd) [lindex [split $temp(cmd)] 0]
set arg [join [lrange [split $arg] 1 end]]
} elseif {[isbotnick [lindex [split $arg] 0]]} {
set temp(cmd) [lindex [split $arg] 1]
set arg [join [lrange [split $arg] 2 end]]
} else { return 0 }
if {[info commands command:$temp(cmd)] != ""} { command:$temp(cmd) $nick $uhost $hand $chan $arg }
}
proc command:gline {nick uhost hand chan arg} {
global top temp
if {[isvoice $nick $chan] || [isop $nick $chan]} {
set ip [lindex [split $arg] 0]
if {![regexp {^(?:(?:[01]?\d?\d|2[0-4]\d|25[0-5])(\.|$)){4}$} $ip]} { putserv "PRIVMSG $chan :\002$nick\002 - NO/Invalid IP USAGE: !gline 193.193.193.193"; return }
set temp(gchan) $chan
set temp(gnick) $nick
putquick "GLINE *@$ip +0 :D"
bind raw - 280 gline:valid
bind raw - 512 gline:invalid
}
}
proc gline:valid {from cmd arg} {
global temp
set glineI [lindex [split $arg] 1]
set glineT [lindex [split $arg] 4]
set glineE [lindex [split $arg] 3]
set glineR [join [lrange [split $arg] 7 end]]
putserv "PRIVMSG $temp(gchan) :\002$temp(gnick)\002 - GLine para \00304$glineI\003 creado en \00312[clock format $glineE]\003 duracion \00303[duration [expr $glineT - $glineE]]\003 expira \00312[clock format $glineT]\003 segs \00303[duration [expr $glineT - [clock seconds]]]\003. Razon: \00306$glineR"
catch {unbind RAW - 280 gline:valid}
catch {unbind RAW - 512 gline:invalid}
}
proc gline:invalid {from cmd arg} {
global temp
putserv "PRIVMSG $temp(gchan) :\002$temp(gnick)\002 - No hay GLine para esa IP"
catch {unbind RAW - 280 gline:valid}
catch {unbind RAW - 512 gline:invalid}
}
putlog "++ Succesfully loaded: \00312GLine"