mIRC Home    About    Download    Register    News    Help

Print Thread
#167793 30/12/06 05:42 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
I can think of no other words nor contexts that it would bother...

So I ask you brigt minded people. (Who know scripting.)

Is there a line I could add in my "alt+r" thingy?

I got an alias, that works on /asl ...

I just wonder if you can help me automate it.
So as if ANYONE ask in a PM/msg; Asl please..
Hey, asl? and so on..


I mean, could you help me say the /asl, automated, anytime anyone mention 'asl' in a PM?


Last edited by gomp; 30/12/06 05:43 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:text:*asl*:?: {
  msg $nick I an XX year old male/female and live in XX.
}


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Quote:
...
<nick1> I'm tired. I only got a measly 3 hours sleep last night.
<nick2> I an XX year old male/female and live in XX.
<nick1> OK... So anyway, I think I'm about to fall asleep
<nick2> I an XX year old male/female and live in XX.
...


Regular expressions to the rescue!:
Code:
on $*:text:/\ba([\.\\\/-]?)s\1l\b/Si:?:{
  msg $nick I'm XX years old, male/female, and live in XX.
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2006
Posts: 9
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2006
Posts: 9
this code is perfect but a litle dangerous any user with bad intention could flood you right off the server (excess flood)

Code:

on $*:text:/\ba([\.\\\/-]?)s\1l\b/Si:?:{
  inc -u20 %asl
  if %asl > 5 timer 1 %asl msg $nick I an XX year old male/female and live in XX.
}



been there done that !!)

Last edited by SICORPS; 30/12/06 08:12 PM.

/ mIRC, PHP, Linux help and tutorial forum: www.SICORPS.org /
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Better would be:

Code:
set -u10 %asl
if (!%asl) { msg $chan your asl info }


Yeah, starbucks_mafia, I knew it would trigger if it was in the middle of another word. I just couldn't think of anything with asl in it that would likely be used in a private message. I didn't think of asleep. As for the regex, I don't know it well... what will that trigger on? asl by itself? asl with a punctuation next to it and nothing else?


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
It'll trigger on "asl", "a/s/l", "a.s.l", "a-s-l", or "a\s\l" next to any non-alphanumeric characters (ie. at the start/end of text, next to punctuation, spaces, quotes, etc.) regardless of any control codes.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ah, that's what all those escape codes were for. Knowing you were doing it for a/s/l, a.s.l, etc, I can actually read what you did and understand it (though I couldn't write it yet). smile


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
So there is no safe way to have an automated respon on "asl" in a /msg chat?



/me is confused confused


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
All you'd need to do is combine starbucks_mafia's code with mine and it will work.


Invision Support
#Invision on irc.irchighway.net
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
I do not understand how to do that, could you please help me again?

I am really not getting this code stuff.. frown


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on $*:text:/\ba([\.\\\/-]?)s\1l\b/Si:?:{
  if (!%asl) msg $nick I'm XX years old, male/female, and live in XX.
  set -u10 %asl On
}


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard