mIRC Homepage
Posted By: zKslol is this possible? - probably a dumb question - 22/12/13 02:47 AM
Hey there! So I found this multi server away script and it works fine, though there's no function to also change nicknames on away/back. So I added this to my remote:

Code:
raw 306:*:{
  if ($network == Whateverreally) {
    nick mynick`afk
  }
}


The problem with that is of course that whatever your reason for going afk, it will still only always do mynick`afk. Whereas I'd like to be able to have several away nicks. So I did something which you'll probably laugh at (but I'm a complete n00b at irc scripting, I only learned about all of this the past few days through picking existing code apart/googling ~_~)

Code:
raw 306:*Away from keyboard*:{
  if ($network == Whateverreally) {
    nick mynick`afk
  }
}


I added "Away from keyboard" under <matchtext>, hoping that would make it so that it would only change nick to mynick`afk if that text is present in the away reason. Didn't work.

My question:
Is there some other way to add this 'property' or whatever u wanna call it so that it changes nick to certain nicknames based on the away reason given??

Would it be possible with something like this?

Code:
raw 306:*:{
  if ($network == Whateverreally && $awaymsg == Something) {
    nick mynick`afk
  }
}


The problem is my $awaymsg will always contain a timestamp.. so it won't ever just be the text "Something". Is there any chance to set it so it doesn't search for the exact text "Something" but a value where "Something" is present?
What's wrong with this?

Code:
if ($network == Whateverreally && *Something isin $awaymsg) {
    nick mynick`afk
  }
from your example:
if ($network == Whateverreally && *Something isin $awaymsg)
is not coded right the tests each need ()'s so:

if ( ($network == Whateverreally) && (*Something isin $awaymsg) )......
And by the way, "isin" operator doesn't take wildcards. Use "iswm" instead.
© mIRC Discussion Forums