mIRC Home    About    Download    Register    News    Help

Print Thread
#134646 03/11/05 01:08 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Few months ago i used to have a $decode virus ban/kick when someone in a channel pmed me with a $decode string, although it didn't seem to work or kick anyone, and the network i go on seems to be ridden with these at times, was wondering if someone can help me make one which would ban/kick them and in the kick message telling them why they were kicked and for help to go to another channel.

#134647 03/11/05 02:59 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Try this:
Code:
on *:text:*$decode*:?: {
  if ($me isop [color:red]#yourchan[/color] && $nick ison [color:red]#yourchan[/color]) {
    ban -k [color:red]#yourchan[/color] $nick 2 Banned for $!decode trojan.  Please visit #help for assistance in removing it.
  }
  window -c $nick
}

Last edited by Riamus2; 03/11/05 04:35 PM.

Invision Support
#Invision on irc.irchighway.net
#134648 03/11/05 03:12 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
blah n/m

isin = ison

Last edited by mIRCManiac; 03/11/05 03:18 PM.
#134649 03/11/05 03:49 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Include the ! in the ban message or $decode will just disappear smile

Banned for $!decode trojan. Please visit #help for assistance in removing it.

#134650 03/11/05 04:37 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Fixed. I always end up saying isin instead of ison ... I think of being IN a channel and not ON a channel. Heh. Oops. And, I didn't think about $decode disappearing. Good catch.


Invision Support
#Invision on irc.irchighway.net
#134651 03/11/05 05:11 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I'm sorry i meant to say that how to i make it ban/kick of the channels i'm opped in not really just a specific channel.

#134652 03/11/05 05:18 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Code:
on ^*:[color:red]OPEN:?[/color]:*$decode*: {
  var %i = 1
  while ($comchan($nick,%i)) {
    var %c = $ifmatch
    if [color:red]([/color]($me isop %c) [color:red]|| ($me ishop %c))[/color] .timer 1 %i ban -k %c $nick 2 Banned for $!decode trojan. Please visit #help for assistance in removing it.
    inc %i
  }
  haltdef
}


~ Edit ~
good catch
wink

Last edited by mIRCManiac; 03/11/05 05:28 PM.
#134653 03/11/05 05:22 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It might be a good idea to use the on open event instead, so that you can prevent the window from visually opening in the first place. Right now it stops the text from showing, but doesn't stop the query window from opening. Just a tip of course.


Gone.
#134654 03/11/05 05:25 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
If it stops the text from showing, how would i know say in future reference who i have banned and kicked, would it be too much hassle you think if it created a text file of the date and time of who was kicked, in what channel?

#134655 03/11/05 05:31 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It wouldn't be a hassle at all.

A hash table would be well suited for this. In the on open event you would do: hadd abusers $fulladdress $ctime (assuming you've already created the hash table called "abusers")

The $fulladdress serves as the hash table item which must be unique, the $ctime is the number of seconds elapsed since 1970. The good thing is you can format this value using $asctime to show it in your prefered <date> <time> combination.

Note I'm just using the $fulladdress as an example, you could use $site or their $nick or whatever will be unique and a means to identify them.

Doing a check on the hash table is easy with $hget, take a look in the help file at /help hash tables

Don't forget to open/load the table on start, and save the table on exit, or at a certain time interval using a timer.

I was going to give you the code, but I think you will greatly increase your scripting skill if you were to try to solve this yourself. The help file contains all you need to know.


Gone.
#134656 03/11/05 05:35 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I personally don't know anything about hash tables and sadly wouldn't know where to start although I'm sure this would be a good and useful script for newbies and advanced users if someone was to make this script and post it somewhere on here or wherever, by the way i changed the keyword

from this:-

on ^*:OPEN:?:*$decode*: {

too on ^*:OPEN:?:*//write $decode*: {

incase i accidently kick people for pming me asking what $decode means or is.

#134657 03/11/05 05:39 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:
I personally don't know anything about hash tables and sadly wouldn't know where to start


That's why you would need to type /help hash tables to learn about them, or check this small first step hash table tutorial. It doesn't cover everything about hash tables, but certainly enough to make your script. I basically already gave you the script, just not in code but in words. Anyway, if you don't want to learn about them, that's fine, I'm sure someone will whip up the code for you. I just thought this would be an excellent incentive to learn about hash tables and improve your skill a bit smile

I like this quote a lot:

Give a man a fish, you have fed him for today. Teach a man to fish, and you have fed him for a lifetime.


Gone.
#134658 03/11/05 05:50 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Only the text is halted, you should still see the kick/ban in all channels you're both in. The only people you won't notice are those that aren't in any channels you're in.

#134659 03/11/05 06:15 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I would be most grateful if someone could whip the code for me, with the hashes, at least i can learn the code when its made incase i want to make hashes of other things, i had a look at the webpage you showed me and also /help hash and couldn't really make heads or tails or it

#134660 03/11/05 07:35 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Just a note, i think kick banning for just saying $decode is over the top, you need to be more exact, as I often see people say in a channel, someone sent me this become an op script, ans someone else well tell them to PM an OP and tell them you were sent a $decode. Its not the funniest for them to pm you to try and help and get banned for saying "joeblogs just sent me a $decode command". frown

#134661 03/11/05 08:09 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Quote:
<user1> How can I hide my passwords?
<user2> I dunno, try using $encode and $decode
* user2 was kicked from #blah by Riamus2 "Banned for $decode trojan. Please visit #help for assistance in removing it."

#134662 03/11/05 08:27 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Don't forget that Riamus used the ? as location part, so that could never occur, unless you replaced <user1> with <Riamus2>. Although I see your point, the matching could be stricter to try to minimize the amount of false positives, however it will never be 100% certain that you don't ban people who are simply reporting a $decode() spam in pm to the user that's hosting this script.


Gone.
#134663 03/11/05 09:08 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, I know. You can use *//write $decode(* for the matchtext if you like. I put the ( in there to help limit mistakes even further. As FiberOPtics pointed out, what I had uses ?, so it would only trigger on a PM. Still, using this other matchtext would limit false positives. I didn't bother pointing it out afterwards because it was already pointed out a couple times that it could detect false positives. It's still better to use a better matchtext than just *$decode*.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard