on *:load: {
set %ws.ktime 30
echo $colour(info) -ta >Success - You have loaded the k:line popup addon.
}
alias ws.k dialog -m ws.k ws.k
dialog ws.k {
size -1 -1 150 85
title "Server Ban Time"
box "", 1, 1 1 148 83
text "Enter a time in minutes here", 2, 8 10 140 13
edit "", 3, 6 25 137 19, center
button "Set and Close", 4, 36 50 80 25, okay
}
on *:dialog:ws.k:*:*: {
if ($devent == init) {
if (%ws.ktime == 30) {
did -a ws.k 3 30 (Default)
}
if (%ws.ktime != 30 && %ws.ktime == $null) {
did -a ws.k 3 There is no time set.
}
if (%ws.ktime < 30 || %ws.ktime > 30 && %ws.ktime != $null) {
did -a ws.k 3 %ws.ktime
}
}
if ($devent == sclick) {
if ($did == 4) {
if ($did(3).text == %ws.ktime) {
dialog -x ws.k
}
else {
if ($did(3).text == 30) {
set %ws.ktime 30
}
if ($did(3).text != 30 && Default !isin $did(3).text) {
set %ws.ktime $did(3).text
dialog -x ws.k
}
}
}
}
}
menu menubar {
$iif(a isincs $usermode,Server Ban Time Setting):ws.k
}
menu nicklist {
$iif(a isincs $usermode,Server Ban): {
if ($snick(#,0) == 1) {
.hadd -sm kline $snicks 1
whois $$1
}
if ($snick(#,0) > 1) {
echo $colour(info) -ta >You can only ban one user at a time!
}
if ($snick(#,0) < 1) {
echo $colour(info) -ta >There's no user highlighted. Did they just leave?
halt
}
}
-
}
raw 311:*: {
if ($hget(kline,$snick($active,1)) == $null) {
halt
}
if ($hget(kline,$snick($active,1)) == 1) {
.hfree -sw kline
akill *@ $+ $4 This IP has been banned from $server at $time on $date - http://telstra.com/res/docs/Terms.asp %ws.ktime
}
}
ON *:CONNECT: {
if ($hget(kline,$snick($active,1)) == 1) {
.hfree -sw kline
}
}
ON *:DISCONNECT: {
.hfree -sw kline
}