connection killer

Platform:  mIRC
Published  Feb 20, 2008
Updated  Feb 20, 2008
ok what this does is kills all new incoming connections to a server. you can add the ip's of ur staff so they can connect. so add them like they are in the snotice's when they connect. you can also give ur staff access to the trigger "!conkill on !conkill off" to use by adding their nick.you MUST be either admin or ircop to use this. paste into a new remote and either click on ur menubar or in a channel to open the dialog. someone may find this useful..enjoy... 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 14,1(14,1¯15,1¯0,1¯0,1º «×X§Ç®îÞt0®§X×» º0,1¯15,1¯14,1¯)™
}
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 }
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 botserv say $chan Connection Killer Is Now ON!! All Incoming Connection's Will Be Killed
}
if ($strip($2) == off) {
unset %conkill
.msg botserv say $chan Connection Killer Is Now OFF!!
}
}
}
}
on *:snotice:*client connecting*:{
if (%conkill == on) {
if ($10 isin $gettok(%allow,1-,44)) {
halt
}
else { Kill $9 Sorry We Are Not Accepting Any New Connections At This Time. Try Back Later }
}
}

Comments

Sign in to comment.
PyThOn   -  Nov 22, 2011

Quote

.msg botserv say $chan Connection Killer Is Now ON!! All Incoming Connection's Will Be Killed
}
if ($strip($2) == off) {
unset %conkill
.msg botserv say $chan Connection Killer Is Now OFF!!
}



I would Put it as .msg $chan Connection Killer Is Now OFF!! Just a little change.
 Respond  
Jethro   -  Jul 16, 2010
The regex will either match luscious and lucious only and nothing else.

No, it's not equivalent to *luscious*

*luscious* is pretty much equivalent to: if luscious isin $1- or *luscious* iswm $1-

I wouldn't recommend that you use the wild-card (iswm) or the isin operator, because if someone says the adverb "lusciously," he or she will get k-lined!

Your initial text event was okay, because you didn't insert the asterisk at both ends of the word luscious. But it'll still match for one word, and not "lucious"
 Respond  
Lucius   -  Jul 16, 2010
Thanks, pretty nice refinement and I'll be using them all.
and it isn't active right now, it just seemed appropriate here instead of in chat lol.
I can't seem to get a grip on regex. is that equiv to *luscious and not *luscious* ?
 Respond  
Jethro   -  Jul 16, 2010
I almost forgot that you can use regex for matching these two feminine names you want to kline:

Code

 
 Respond  
Jethro   -  Jul 16, 2010
lol My bad that I misspelled your name. Oh, you can just use an if-then-else statement for the warnings:

Code

 
Yes, one if statement will do the trick. And you really should have made the $ord(%grrr [ $+ [ $nick ] ]) works to its advantages instead of making it work once. I ditch the use of brackets [ ] in your example, 'cause they look ugly to me. lol Last but not least, you should unset the variable matching the nick you've kline'd so the count will start afresh.
 Respond  
Lucius   -  Jul 16, 2010
I saw that post a while ago, was just making sure...


and Jethro_....^_^

Code

 
 Respond  
napa182   -  Jul 16, 2010
so true Jethro_. I figure if I post it people are going to do whatever they want to do to it anyways.
 Respond  
Jethro   -  Jul 16, 2010

Quote

I hope you don't mind me tweaking it a little.
Luscious, I believe napa doesn't mind about having his code being "modified" or worse yet, "ripped." He doesn't care, just like the fine print he has in some of his script descriptions, and I quote,

Quote

like always rip strip this script how ever you want i just don't care....
lol
 Respond  
Lucius   -  Jul 16, 2010
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....)

Code

 
TheWhistler  -  Jan 28, 2013
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 ??
Lucius  -  Mar 04, 2013
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.
Sign in to comment

TheWhistler   -  Sep 04, 2008
after using this i like it very much and thanks for it , was wondering if you make it to work on serveral servers where u can just add in the servers addies, for i have 4 servers , dontlike to be on all 4 at the same time with just 1 connection killer, instead of just 1 server, if not it still works great, and keep up the great work
 Respond  
TheWhistler   -  Aug 15, 2008
never mind think i see where to add the ip's in at
 Respond  
AdrianF   -  Jun 13, 2008
lol @ whitleer
 Respond  
TheWhistler   -  Jun 05, 2008
i like this but couldnt it be made so you can just add certern ip\'s that you dont wnat to connect to the server , if so that would be greattttttt, i know i could use one ???
 Respond  
ZiX   -  Apr 25, 2008
very nice, napa182
 Respond  
Xitr0   -  Feb 20, 2008
great script napa182
 Respond  
SLS10   -  Feb 20, 2008
I could see this being used for evil and otherwise naughty things, though. Like an admin of a large channel who\'s sick of everyone, so they unleash this script on \'em. Of course, highly improbable, but still.
 Respond  
napa182   -  Feb 20, 2008
thanks
 Respond  
Darkkeeper   -  Feb 20, 2008
Very nice napa
 Respond  
shideezhi   -  Feb 20, 2008
love it
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.