Originally Posted By: Anti
Originally Posted By: KindOne
https://en.wikichip.org/wiki/mirc/on_events/on_text


https://en.wikichip.org/wiki/mirc/raw_events


You cannot have one event inside of another event.

I guess you want something like this:


Code:
ON *:TEXT:*:?:{

if ( server1 isin $server ) { echo -a $nick usa simosnap }
if ( server2 isin $server ) { whois $nick }

}

raw 311:*:{ echo -a $1- }


yes, I solved this , the events cannot be embedded.

But I have another problem with this code:
Code:

raw 311:*:{

  set $+(%,server,_,$2) $1-
  if (server_name isin $+(%,server,_,$2)) { timer 1 10 msg $2 $read(C:\mIRC\testi\6b.txt) }
  else { timer 1 10 msg $2 $read(C:\mIRC\testi\6-skype.txt) }
}



This piece of code execure ever else statement , and not if. And I don't understand why.

$2 is the nick_name of the user.
Excuse me per my ignorance, but I amn't expert with
mIRC scripting.

Thanks for you help




You can use this instead:

If (server_name isin $1-) { ... }

No need to check the variable you have just set to $1- as $1- is still available.

Also, unless you know exactly what the contents of the text file you are trying to read are going to be, you should use the ‘n’ flag in $read() as otherwise there is a danger that mIRC will evaluate the contents.

$read(...,n)

There is a double-danger in your code as you’re using /timers, which evaluate everything twice. So you should use $!read(...,n) as this will prevent any evaluation problems.