Hello people,
Is there a way to make a script wait for the result of a RAW event?
I'm putting together a script that collects some userinfo
(IP, channels ppl are on, etc) and outputs that to a window.
The part i'm struggling with is this:
RAW 352:*: { ; [color:red] the RAW numeric for the WHO command [/color]
%User.Nick = $6
haltdef
}
on *:dns: {
set %User.Ip 0.0.0.0
set %User.Nick
set %User.Channels
set %User.Address
set %User.FullId
set %User.Comment
%User.Matches = $dns(0)
if ( %User.Mode == UseNick ) {
%User.Ip = $dns(%User.Matches).ip
%User.Nick = $dns(%User.Matches).nick
%User.Address = $dns(%User.Matches).addr
pDisplayData
}
else {
while ( %User.Matches > 0 ) {
%User.Ip = $dns(%User.Matches).ip
%User.Address = $dns(%User.Matches).addr
[color:red]; my problem: the command's executed but immediately after that,
; mirc continues with the next command in line, pDisplayData [/color]
who %User.Address
pDisplayData
dec %User.Matches
}
}
}
pDisplayData displays (among other things) the value of %User.Nick, which receives its value in the RAW event.
Unfortunately, mIRC does not wait for that event to finish and immediately processes the command below (pDisplayData).
So: can i somehow tell mIRC to wait? So far i've tried a timer (no result) and a loop that kept running for as long as a
boolean wasn't reset by a RAW event i wrote for numeric 315 (the End of WHO-list) (didn't work either)
Any hints you can give me are much appreciated