mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2013
Posts: 5
Z
zKslol Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
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??


Joined: Dec 2013
Posts: 5
Z
zKslol Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
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?

Joined: Dec 2013
Posts: 5
Z
zKslol Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Z
Joined: Dec 2013
Posts: 5
What's wrong with this?

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

Joined: Mar 2004
Posts: 526
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
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) )......


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Joined: Mar 2010
Posts: 146
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 146
And by the way, "isin" operator doesn't take wildcards. Use "iswm" instead.


Nothing...

Link Copied to Clipboard