mIRC Home    About    Download    Register    News    Help

Print Thread
#212268 17/05/09 03:56 AM
Joined: Oct 2008
Posts: 8
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2008
Posts: 8
So, wanted to make a fun little script to /query someone when they failed a nickserv identify.
Code:
on *:TEXT:*Failed IDENTIFY for*:*: {
  .query $regsubex($5,(\s+)\!) >I'm sorry Dave, I'm afraid I can't do that...
}


A friend who knows a bit about regex suggested (\s+)\!, but the string that gets returned ends up being the whole nick!user@host, and he can't remember the syntax so that it doesn't match the !.

Any help is appreciated.

SoupNazi #212269 17/05/09 05:23 AM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
A quick and dirty way would be:
Code:
$regsubex($5,/!.+/,)

However, something non-regex would work fine too here:
Code:
$gettok($5,1,33)

May I perhaps point out that people can get very paranoid/uncomfortable if you run this script? Not sure if that's what you want to end up doing.


Link Copied to Clipboard