mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
I'm trying to write an on text event where it will auto ban the user that types somthing to this nature: http://127.0.0.1/file.exe , the trigger being http:// and .exe and if possible numerical characters like an ip address. I would really appreciate this, thanks.

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

Code:
on @*:TEXT:*http*.exe*:#: if $badhttp($1-) { ban -k # $nick 2 Lamers not welcome. }
 [color:red]  [/color] 
alias badhttp return $regex($1,/http:\/\/([01]?\d\d?|2[0-4]\d|25[0-5])\.(?1)\.(?1)\.(?1)\/\S+\.exe/Sig)



Greets


Gone.
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
To test it I replaced the ban commands with msg # works. then opended an mirc located in another folder and typed in http://127.0.0.1/blah.exe to test it, it didnt work. I did have op's in the channel, then I tried removing the @ part and it still didnt work.

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
That has nothing to do with the code :tongue:

You probably have another on text event in that same remote, or you did something wrong.

Look:

[17:22:16] * Now talking in #cellka
[17:22:27] <Ginnypig> http://127.0.0.1/blah.exe
[17:22:28] * FiberOPtics sets mode: +b *!*@kn-res.kuleuven.net
[17:22:28] * You were kicked by FiberOPtics (Lamers not welcome.)
[17:22:28] * Attempting to rejoin channel #cellka
[17:22:28] * Unable to join channel (address is banned)

Greets


Gone.
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
Code:
on @*:TEXT:*http*.exe*:#: if $badhttp($1-) { msg # works. }
alias badhttp return $regex($1,/http:\/\/([01]?\d\d?|2[0-4]\d|25[0-5])\.(?1)\.(?1)\.(?1)\/[^\s]+\.exe/Sig)

thats what I have in remotes and it's not working

<TestDude> http://127.0.0.1/blah.exe

EDIT: I also moved it to an empty file, still nothing

Last edited by LostServ; 15/11/04 04:38 PM.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I disabled the code I have, copied the code you pasted, and got this:

[17:40:37] * Attempting to rejoin channel #cellka
[17:40:37] * Rejoined channel #cellka
[17:40:42] <Ginnypig> http://127.0.0.1/blah.exe
[17:40:42] <FiberOPtics> works.

Like I said, you either have another on text event that is interfering, or you already have an alias named badhttp.

Disable my alias by putting a ; in front of it, close the mIRC Scripts Editor, and type //echo -a * $isalias(badhttp)

Also look in that remote where you pasted the snippet for other on text events above this one. Or simply put it in a new remote.

Are your remotes even on? /remote on

Greets


Gone.
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
It's in a new remote file, nothing. I disabled the alias using the comment ; and hit save, then typed in //echo -a * $isalias(badhttp) and got * $false

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Lol, I can't help you.

Maybe try it in a clean mIRC?

Look, a friend of mine is in school right now, in programming class, and mIRC is running, fresh copy.

I gave him the code, and this is what happened:

[17:56:30] FiberOPtics: make sure ur remotes are on
[17:57:09] FiberOPtics: just tell me when smile
[17:59:52] (Majin-School) go ahead
[18:00:07] FiberOPtics: ok lets test it
[18:00:07] FiberOPtics: http://127.0.0.1/blah.exe
[18:00:09] (Majin-School) works.
[18:00:18] FiberOPtics: ok thanks, you can delete it now

All I can think of now is that your clone was horribly lagged, you have custom aliases for msg and regex, your remotes are off, or something is terribly corrupted in your mIRC.

Someone else will have to help you, hope you get it working.

Bye


Gone.
Joined: Mar 2004
Posts: 359
L
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
EDIT:

Man..it was my remotes being off..Thanks again smile

Last edited by LostServ; 15/11/04 05:17 PM.

Link Copied to Clipboard