mIRC Home    About    Download    Register    News    Help

Print Thread
auto change nick? #220953 04/05/10 02:21 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
i have a random nick script but i want it to be performed when i got a message like this "Nickname already in use" so basicaly if i typed in a nick if it is already in use this script will autorun...


Code:
alias randomnick {
  nick $+(random],$regsubex($str(.,$r(5,5)),/./g,$r(a,z)))
}


Re: auto change nick? [Re: sigbin] #220957 04/05/10 05:57 AM
Joined: Nov 2009
Posts: 81
V
Voglea Offline
Babel fish
Offline
Babel fish
V
Joined: Nov 2009
Posts: 81
Code:
raw 433:*: {
  randomnick
}

Re: auto change nick? [Re: sigbin] #220959 04/05/10 06:28 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
raw 433:*: { nick $+([random],$regsubex($str(.,$r(5,5)),/./g,$r(a,z))) | halt }

Re: auto change nick? [Re: Tomao] #220960 04/05/10 06:35 AM
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
thankz for the help... very much appreciated

Re: auto change nick? [Re: sigbin] #221061 06/05/10 10:53 AM
Joined: Apr 2010
Posts: 923
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 923
nick $+(random],$regsubex($str(.,$r(5,5)),/./g,$r(a,z)))

u do realise that $r(5,5) will always return 5 right?
and that in /./g the "." needs to be exscaped, right: /\./g


I am SReject
My Stuff
Re: auto change nick? [Re: FroggieDaFrog] #221075 06/05/10 05:04 PM
Joined: Sep 2005
Posts: 2,876
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,876
The "." doesn't need to be escaped; a "." in a regular expression matches any single character. So . and \. will have the same effect in this case.

Re: auto change nick? [Re: hixxy] #221089 07/05/10 10:40 AM
Joined: Apr 2010
Posts: 923
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 923
yea, now that u said something, I realise it, but i think ol' buddy was trying to match "." instead of "any one char". All in the inner workings i guess smile


I am SReject
My Stuff