mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
I'm trying to understand a script offered to me for the purpose of processing JOIN messages in different ways for different classes of users identified by differing access levels.

A few snippets of code to illustrate:

on ^1!:JOIN:#:{
msg $chan Welcome to the channel, $nick
}
on ^100!:JOIN:#:{
msg $nick Thanks for returning, $nick
}

I can't find a reference to the "^" access level prefix in the mIRC Help file, and while I see nothing in the script that appears likely to have any bad behavior such as file deletion or other obviously bad behavior, I don't like to run any script I don't fully understand. I'm also puzzled by the trailing "!" following the access levels, as that doesn't seem to match the Help file description of a "!" suffix.

Any clarification would be appreciated.

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Regarding the ^: /help halting default text (which is not done here)
The exclamation mark here seems to be used as described in /help access levels > "The ! prefix". But as you noted, it would have to precede the number.

So both cases seem to be a case of bad scripting.


Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Just think of ! prefix as: if ($nick != $me) {

Joined: May 2010
Posts: 36
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2010
Posts: 36
thanks for the clarifications: I'd suspected that the "!" suffix might have been misplaced (or the help text wasn't correct -- the example given in the help file included an "!" as, arugably, part of message text to be displayed by an /echo command. I think I'll suggest a change to the Help file with respect to the "^" prefix so that it is included in the larger discussion of event prefixes, and with an index reference to Halting Default Text.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
If you didn't include the level but "!" prefix, I wouldn't call it misplaced. It's used so that the join event won't get triggered by the client that runs the code, with its own join.


Link Copied to Clipboard