I have a problem with my script, if im on 8 channels it makes me flood out, i dont know if it have to do with this alias or with my custom action, someone that can see any problems with the code? it check if a game is started, if it is it should set me away, it check with a DLL if the game is started or not
Code:
utgoaway {
  if ($away == $false) {
    set %ut-on 1
    unset %ut-tell
    unset %_inputlines
    if (%say-utstst == 1) { set %ut-tell - $uts.eval( [ %uts.com.playing ] ) }
    set %awaymsg Playing Unreal Torurnament %ut-tell
    if (%silentaway == $true) { goto silent }
    set %atime $ctime
    if (%use.awaynick == 1) { set %bnick $me | _awnick }
    set %amiaway on
    writeaslog %tecken 4@ Set to Away mode: $time(HH:nn:ss) $date(mm/dd/yyyy) $chr(91) $+ %awaymsg $+ $chr(93)
    ame is away $([ [ %awaymsg ] ],) since: $chr(91) $+ $time(h:nn:ss tt) $+ $chr(93) l' $+ $group(#logger) - p' $+ $group(#pager) %ad1
    scid -at1 .way away $([ [ %awaymsg ] ],) since: $chr(91) $+ $time(h:nn:ss tt) $+ $chr(93) l' $+ $group(#logger) - p' $+ $group(#pager) %ad1
    halt
    :silent
    set %atime $ctime
    if (%use.awaynick == 1) { set %bnick $me | _awnick }
    set %amiaway on
    writeaslog %tecken 4@ Set to Silent away mode: $time(HH:nn:ss) $date(mm/dd/yyyy) $chr(91) $+ %awaymsg $+ $chr(93)
    grcho Silent Away $chr(91) $+ %awaymsg $+ $chr(93) since: $chr(91) $+ $time(h:nn:ss tt) $+ $chr(93) l' $+ $group(#logger) - p' $+ $group(#pager) %ad1
    scid -at1 .away away $([ [ %awaymsg ] ],) since: $chr(91) $+ $time(h:nn:ss tt) $+ $chr(93) l' $+ $group(#logger) - p' $+ $group(#pager) %ad1
  }
}

and here is my ame alias, i guess it can be coded more clean, but i did the best i could wink
Code:
alias ame {
  var %i = 0
  while (%i < $scon(0)) {
    inc %i 1
    scid %i
    if ($status == connected) { ame_ $1- }
  }
}
alias ame_ {
  var %i 1
  while (%i <= $chan(0)) {
    .describe $chan(%i) $1-
    echo $color(action) $chan(%i) $me $+  $1- 
    inc %i
    haltdef
  }
}

any ideas? :tongue:

--------- Edit

I know i can use if (!$away), but wanted to try if that was the problem, it wasnt..

Last edited by sparta; 25/11/06 04:30 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }