Away notifier

By Vox91 on Sep 22, 2008

well what you see is what you get

; ----------------------------------- 
; Name Addon: Away notifier 
; Created by: Patrick Rennings (Vox) 
; Contact: Vox@noxxie.nl // irc.onlinegamesnet.net - #centravi
; Version: RC 2.1 
; ----------------------------------- 

on *:TEXT:$( * $+ $me $+ * ):#: { 
  if ($away == $false) { halt } 
  elseif ( %flood [ $+ [ $address($nick,2) ] ] == on) { halt } 
  else { 
    notice $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . ( $+ $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @hlmsg 
    aline @hlmsg ( $+ $nick @ $time on $date ( $+ $chan $+ )) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
} 

on *:TEXT:*:?: { 
  if ($away == $false) { halt } 
  elseif ( %flood [ $+ [ $address($nick,2) ] ] == on) { halt } 
  else { 
    msg $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . (Reason: $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @qrymsg  
    aline @qrymsg ( $+ $nick @ $time on $date $+ ) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
} 

Comments

Sign in to comment.
fahadbalboa   -  Mar 03, 2009

Not Working Pal

 Respond  
Cheiron   -  Sep 22, 2008

lil bit of spellchecking and this not a bad lil snippet.. i gonna kick off the score rating with a nice full 6 score for your first one :)

 Respond  
Typo   -  Sep 22, 2008

I would also recommend you drop the needless halts and combine the if's.
So your code:

on *:TEXT:$( * $+ $me $+ * ):#: { 
  if ($away == $false) { halt } 
  elseif ( %flood [ $+ [ $address($nick,2) ] ] == on) { halt } 
  else { 
    notice $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . ( $+ $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @hlmsg 
    aline @hlmsg ( $+ $nick @ $time on $date ( $+ $chan $+ )) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
} 

on *:TEXT:*:?: { 
  if ($away == $false) { halt } 
  elseif ( %flood [ $+ [ $address($nick,2) ] ] == on) { halt } 
  else { 
    msg $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . (Reason: $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @qrymsg  
    aline @qrymsg ( $+ $nick @ $time on $date $+ ) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
} 

could be

on *:TEXT:$( * $+ $me $+ * ):#: { 
  if ($away) && ( %flood [ $+ [ $address($nick,2) ] ] != on) { 
    .notice $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . ( $+ $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @hlmsg 
    aline @hlmsg ( $+ $nick @ $time on $date ( $+ $chan $+ )) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
} 
on *:TEXT:*:?: { 
  if ($away) && ( %flood [ $+ [ $address($nick,2) ] ] != on) {  
    .msg $nick I am curruntly away. My awaytime is: $duration($awaytime) $+ . (Reason: $iif($awaymsg == $null, None, $awaymsg) $+ ) 
    window @qrymsg  
    aline @qrymsg ( $+ $nick @ $time on $date $+ ) $1- 
    set -u10 %flood [ $+ [ $address($nick,2) ] ] on 
  } 
}

Notice I also silenced the msg and notice commands like cheiron suggested.

 Respond  
Cheiron   -  Sep 22, 2008

only a few minor clauses i see to edit firstly before i test it or the others do.

change your notice and msg events to make them silent.

notice becomes .notice
msg becomes .msg

will leave my comments at that for the moment

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.