mIRC Homepage
Posted By: LostServ on text event, dealing with links.. - 15/11/04 02:57 PM
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.
Posted By: FiberOPtics Re: on text event, dealing with links.. - 15/11/04 03:59 PM
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
Posted By: LostServ Re: on text event, dealing with links.. - 15/11/04 04:12 PM
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.
Posted By: FiberOPtics Re: on text event, dealing with links.. - 15/11/04 04:23 PM
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
Posted By: LostServ Re: on text event, dealing with links.. - 15/11/04 04:36 PM
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
Posted By: FiberOPtics Re: on text event, dealing with links.. - 15/11/04 04:41 PM
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
Posted By: LostServ Re: on text event, dealing with links.. - 15/11/04 04:44 PM
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
Posted By: FiberOPtics Re: on text event, dealing with links.. - 15/11/04 05:02 PM
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
Posted By: LostServ Re: on text event, dealing with links.. - 15/11/04 05:11 PM
EDIT:

Man..it was my remotes being off..Thanks again smile
© mIRC Discussion Forums