mIRC Home    About    Download    Register    News    Help

Print Thread
#173447 25/03/07 12:04 PM
Joined: Dec 2006
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Dec 2006
Posts: 14
None of these Away managers seem to be what I am looking for. I'm looking for an addon/script that does NOT post any ads or "this script is loaded" messages into the channel if being used.

I go afk at random and do not put up aways, but people talk about a sticky bot or list where they go afk, and if their name or any other specific assigned words like pings are said, there will be a popup or a list with everything so you can see if someone wanted you for something while you were gone. I would prefer something loadable/unloadable so I can load it when I do leave (but again no in channel notify of a script or addon being loaded that everyone can see) but I'm looking for something that doesn't make you change your nick or anything either. Just what I mentioned, if there is anything.

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
menu channel {
  AwayLogger ON/OFF:{
    $iif(($group(#awaylogger) == ON),disable,enable) #awaylogger
    $iif($window(@awaylogger),window -c,window -ls) @AwayLogger
  }
}
#awaylogger off
on *:text:*:*:{
  if ( $me isin $strip($1-) ) || ( ping isin $strip($1-) ) || (yourmatch isin $strip($1-) ) {
    aline @awaylogger $timestamp $+(<,$nick,>) $strip($1-)
  }
}
#awaylogger end


This is what I think you want, it's not watertight. Perhaps it's a start though. Change the "yourmatch" obviously.

btk


billythekid
Joined: Dec 2006
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Dec 2006
Posts: 14
That sounds like it might work. Is there anything else I need to change? Or how to I activate it, exactly? And add more than one word to the list to be alerted with?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Activate/deactivate it by right clicking in a channel window, and selecting the appropriate option.
Add extra words by modifying the if statement located immediately after the ON TEXT event. Note: If you have a lot of words, you might want to use $istok, rather than a lot of OR (||) statements.

I suggest you read the help file under Token Identifiers if this sounds likely. I strongly suggest this if you're going to have 6 or more words.

Joined: Dec 2006
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Dec 2006
Posts: 14
So this line: if ( $me isin $strip($1-) ) || ( ping isin $strip($1-) ) || (wordhere isin $strip($1-) ) {

Would this if ( $me isin $strip($1-) ) || ( ping isin $strip($1-) ) || (wordhere || otherword isin $strip($1-) ) {

work? I tried that but then it logs every thing in the channel. also is there a way to set this so i can get everything a certain nick says?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
unfortunately, at this time, doing multiple comparisons like what you're wanting have to be written out like
Code:
if ($me isin $strip($1-)) || (ping isin $strip($1-)) || (wordhere isin $strip($1-)) || (otherword isin $strip($1-)) {


If you want to check what a specific nick says, you could do it like:
Code:
if $istok(<list of nicks>,$nick,32) {
  if ($me isin $strip($1-)) || (ping isin $strip($1-)) || (wordhere isin $strip($1-)) || (otherword isin $strip($1-)) {


Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
Originally Posted By: RusselB
unfortunately, at this time, doing multiple comparisons like what you're wanting have to be written out like
Code:
if ($me isin $strip($1-)) || (ping isin $strip($1-)) || (wordhere isin $strip($1-)) || (otherword isin $strip($1-)) {


not necessarily ;> there's always the regex method (if you're interested in referring to the string that matched) or in this case:

Code:
if ($count($strip($1-),$me,ping,wordhere,otherword)) {


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Dec 2006
Posts: 14
N
Pikka bird
OP Offline
Pikka bird
N
Joined: Dec 2006
Posts: 14
I think I got the multiples working, but I don't get the nick one yet. What I meant by that was logging - everything - a certain nick says when it is on. If that is what the code is for, it seems to be giving errors when I try it. This is the code I'm using in full, can someone let me know where to put the nick-specific one in?

Code:
menu channel {
  AwayLogger ON/OFF:{
    $iif(($group(#awaylogger) == ON),disable,enable) #awaylogger
    $iif($window(@awaylogger),window -c,window -ls) @AwayLogger
  }
}
#awaylogger off
on *:text:*:*:{
  if ( $me isin $strip($1-) ) || ( ping isin $strip($1-) ) || (word1 isin $strip($1-)) || (word2 isin $strip($1-)) || (word3 isin $strip($1-)) || (word4 isin $strip($1-)) || (word5 isin $strip($1-)) || (word6 isin $strip($1-)) {
    aline @awaylogger $timestamp $+(<,$nick,>) $strip($1-)
  }
}
#awaylogger end

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
#awaylogger off
on *:text:*:*:{
  if $istok(list of nicks space separated,$nick,32) || ( $me isin $strip($1-) ) || ( ping isin $strip($1-) ) || (word1 isin $strip($1-)) || (word2 isin $strip($1-)) || (word3 isin $strip($1-)) || (word4 isin $strip($1-)) || (word5 isin $strip($1-)) || (word6 isin $strip($1-)) {
    aline @awaylogger $timestamp $+(<,$nick,>) $strip($1-)
  }
}
#awaylogger end



Link Copied to Clipboard