XMAS TIME!!!!!
I love it too napa, just what I always wanted :]
I hope you don't mind me tweaking it a little. I added a notice to the allowed connections, so if you are using this to keep the site empty (no admin around etc) as soon as one allowed does sign in, it will msg them after 10 seconds (to give them time to enter rooms etc) and let them know that it's on and nobody can enter.
I also added a log to it, when the connection killer is turned off either by dialog or by trigger it will post each killed connection since it was turned on (in order of: 1st kill---most recent end) then wipe the log. (the log is posted in #AdminRoom but you can change that right at the botton in the: alias conkicklist
I know these tweaks aren't for everyone, but for a fairly quiet site that closes shop late at night, it's perfect in my opinion. I couldn't have made the script myself, TY napa for not biting my head off for these additions (I HOPE....)
dialog conkill {
title "Connection Killer"
size -1 -1 156 132
option dbu
box "Address To Allow", 1, 2 1 97 33
text "Enter Adderss:", 2, 5 10 37 8
edit "", 3, 5 20 91 9, autohs
button "Add", 4, 48 10 18 9, flat
button "Del", 5, 76 10 18 9, flat
box "Address Allow List", 6, 2 37 97 58
list 7, 5 48 91 44, size vsbar
box "Con Killer On/Off", 8, 101 1 53 24
check "on", 9, 104 12 17 10, flat
check "off", 10, 133 12 17 10, flat
edit "", 11, 119 82 31 9, read
text "Time:", 12, 104 82 14 8
box "Trigger Access", 13, 101 29 53 25
check "on", 14, 104 40 17 10, flat
check "off", 15, 133 40 18 10, flat
box "Date/Time", 16, 101 58 53 37
text "Date:", 17, 104 69 14 8
edit "", 18, 119 69 31 9, read
box "Add/Del Nicks To Use Trigger", 19, 2 98 97 32
list 20, 105 107 45 19, size vsbar
text "Add/Del Nick:", 21, 5 107 33 8
edit "", 22, 42 107 50 9
button "Add", 23, 12 117 26 9, flat
button "Del", 24, 53 117 26 9, flat
box "Nick Trigger List", 25, 101 98 53 32
}
dialog conkir {
title "ERROR"
size -1 -1 91 23
option dbu
box "??X????t0??X?", 1, 1 1 89 21
text "ERROR! Please Enter An Address", 2, 4 10 84 8
}
dialog conkiw {
title "ERROR"
size -1 -1 91 23
option dbu
box "??X????t0??X?", 1, 1 1 89 21
text "ERROR! Please Enter A Nick", 2, 4 10 84 8
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Connection Killer
echo 12 -a A Script0rs Inc. Production
echo -a (???? ??X????t0??X? ????)?
}
menu menubar,channel {
.Connetion killer:{ conkill }
}
alias conkill { dialog $iif($dialog(conkill),-v,-md) conkill conkill }
alias conkir { dialog $iif($dialog(conkir),-v,-md) conkir conkir }
alias conkiw { dialog $iif($dialog(conkiw),-v,-md) conkiw conkiw }
alias datee { did -ra conkill 18 $date(mm.dd.yy) }
alias contime { did -ra conkill 11 $time(h:nn:sst) }
on *:DIALOG:conkill:close:0:{ .timerdatte off | .timercon off }
on *:DIALOG:conkill:init:0:{
if (%conkill) { did -c conkill 9 }
if (!%conkill) { did -c conkill 10 }
if (%trigger) { did -c conkill 14 }
if (!%trigger) { did -c conkill 15 }
did -a conkill 11 $time(h:nn:sst) | .timercon 0 1 contime
did -a conkill 18 $date(mm.dd.yy) | .timerdatte 0 1 datee
if (%allow) {
var %conallow = $gettok(%allow,1-,44)
var %bo = $numtok(%conallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 7 $gettok(%conallow,%oh,44)
inc %oh
}
}
if (%trignick) {
var %trigallow = $gettok(%trignick,1-,44)
var %bo = $numtok(%trigallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 20 $gettok(%trigallow,%oh,44)
inc %oh
}
}
}
on *:DIALOG:conkill:sclick:*:{
if ($did == 9) { set %conkill on | did -u conkill 10 }
if ($did == 10) { unset %conkill | did -u conkill 9 | conkicklist }
if ($did == 14) { set %trigger on | did -u conkill 15 }
if ($did == 15) { unset %trigger | did -u conkill 14 }
if ($did == 4) {
if (!$did(3).text) {
conkir
}
else {
set %allow $addtok(%allow,( $+ $did(3).text $+ ),44)
did -r conkill 3
did -r conkill 7
var %conallow = $gettok(%allow,1-,44)
var %bo = $numtok(%conallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 7 $gettok(%conallow,%oh,44)
inc %oh
}
}
}
if ($did == 5) {
if (!$did(3).text) {
conkir
}
else {
set %allow $remtok(%allow,( $+ $did(3).text $+ ),1,44)
did -r conkill 3
did -r conkill 7
var %conallow = $gettok(%allow,1-,44)
var %bo = $numtok(%conallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 7 $gettok(%conallow,%oh,44)
inc %oh
}
}
}
if ($did == 23) {
if (!$did(22).text) {
conkiw
}
else {
set %trignick $addtok(%trignick,$did(22).text,44)
did -r conkill 22
did -r conkill 20
var %trigallow = $gettok(%trignick,1-,44)
var %bo = $numtok(%trigallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 20 $gettok(%trigallow,%oh,44)
inc %oh
}
}
}
if ($did == 24) {
if (!$did(22).text) {
conkiw
}
else {
set %trignick $remtok(%trignick,$did(22).text,1,44)
did -r conkill 22
did -r conkill 20
var %trigallow = $gettok(%trignick,1-,44)
var %bo = $numtok(%trigallow,44), %oh = 1
while ( %oh <= %bo ) {
did -a conkill 20 $gettok(%trigallow,%oh,44)
inc %oh
}
}
}
}
on *:text:*:#: {
if ($strip($1) == !conkill) {
if ($nick isin $gettok(%trignick,1-,44)) && (%trigger == on) {
if ($strip($2) == on) {
set %conkill on
.msg #AdminRoom $chan Connection Killer Is Now ON!! All Incoming Connection's Will Be Killed
}
if ($strip($2) == off) {
unset %conkill
conkicklist
.msg #AdminRoom $chan Connection Killer Is Now OFF!!
}
}
}
}
on *:snotice:*client connecting*:{
if (%conkill == on) {
if ($10 isin $gettok(%allow,1-,44)) {
timer 1 10 notice $9 CONKILLER IS ON, please turn it off if you are staying here. (in admin room: !conkill off)
halt
}
else {
if (!%conkickercount) {
set %conkickercount 1
}
while (%conkickernick [ $+ [ %conkickercount ] ]) {
inc %conkickercount
}
set %conkickernick [ $+ [ %conkickercount ] ] $time(ddd:hh:mmtt) > $1-
Kill $9 Sorry We Are Not Accepting Any New Connections At This Time. Try Back Later }
}
}
alias conkicklist {
if (!%conkickernick1) { msg #AdminRoom No attempted connections while CONKILLER was turned on. }
if (%conkickernick1) {
msg #AdminRoom CONKILLER LOG: (listed from earliest to most recent)
while (%conkickercount) {
timer 1 %conkickercount msg #AdminRoom killed: %conkickernick [ $+ [ %conkickercount ] ]
unset %conkickernick [ $+ [ %conkickercount ] ]
dec %conkickercount
if (%conkickercount < 1) {
unset %conkickercount
HALT
}
}
}
}
It's been a long time since I coded so I can't offer to fix it as I barely remember how this works but from memory I remember that the allow address could be quite fiddly, it has to match the ip as the server sends it -perfectly- (IE: maybe you need brackets/different spacings, or letters if it is kept as a secure format, or even it's checking the wrong word in the connection message to match against). As for the conkill, I don't know why it wouldn't work for you. Possibilities are: server has a different format for the connection messages or kill commands, and first check as always, the script is not on an admin connection.
Last I used this (probably only a couple of months after I posted it) it was working fine on a chatspace server.
for some reasons the Trigger !conkill do not work and Address To Allow is not working either , i get no errors but as for the connection killer it works great just those 2 dont work, reason i dont know, even my friend has it all the above do the same thing, is there any reason why they dont work ??