mIRC Home    About    Download    Register    News    Help

Print Thread
#43723 23/08/03 01:09 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I couldent find anything that helped me when i searched the forums, i want to set a %var when a user with a serten level joins a channel, i have been trying soon everything in the mirc.hlp file, and i cant get it right.. i must have missed somthing in the file, and i cant figure out what..

on *:JOIN:#: {
if ($nick == master) { .notice $nick You have master status ..... }
.notice $nick Welcome to $chan ...............
}

how can i identify that $nick if he are in my userlist as master? i have been trying the $ulevel - $level(nick) and so on, and still nothing :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#43724 23/08/03 01:21 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
on master:JOIN:#:{ commands }
/auser master mask|nick


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#43725 23/08/03 01:24 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I have a trigger for every one that join "on *:JOIN:#":.. but if the nick that join is a master, then i want to send that user a line that the others dont get, it show commands and other stuff, no need to send that to ppl that cant use them.. and i have added him with the level 3 guser $nick 3 .. so i need to match hes host, then check if he have the master status or not.. confused


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#43726 23/08/03 01:35 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Just put the on master:JOIN:#: line above the on others so it matches first.

on master:JOIN:#:{ master commands }
on 3:JOIN:#:{ userlevel 3 commands }
on *:JOIN:#:{ everybody else's commands }


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#43727 23/08/03 01:37 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
OK.. i try that.. thnx laugh


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#43728 23/08/03 02:26 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
couldnt you also do:

ON *:join:#: {
if ($level($nick) == 3) { stuff-1 }
if ($level($nick) == master) { stuff-2 }
else { stuff three }
}

Wouldnt that be better than 3 different on join events? Asking out of curiosity since I thought if you had 2 of the same type of events in the same file only the first would fire


Those who fail history are doomed to repeat it
#43729 23/08/03 04:33 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
But those three are not the same. You can have only one event FIRE (or activate) for each file, but you can have as many variations on the event header (the bit before the start of the actual scripting code) as your mind can dream up, all in the same file. It's just that when one of them matches and fires, no more events of that type will be examined in that file. mIRC then goes on the the next loaded script file and repeats the process there.


on master:JOIN:#HelpDesk,#mIRC:
on master:JOIN:#Help:
on master:JOIN:#:

These three event headers are all different and only one of them will fire for anyone on the master level. The same thing holds true for the on 3:JOIN: event headers and finally the on *:JOIN: events.

Note that the order they are placed in the file is important. If you want master's to match before checking them for level 3, put the master event headers first in that file. on *:EVENT: should be last as it catches everyone and is roughly the same as the ELSE for that event.

When I have speed tested this in the past, separate events worked faster than a single long event. This seems contrary to how I'd think it would be since mIRC only has to process just the one event. However, if you're only doing just the code required for that event if it fires, mIRC doesn't have to parse anything else at all to see if there are more commands it has to deal with.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard