WorldDMT commented on a Page, PM Blocker  -  Aug 31, 2010

upper or lower dont bother
your alias can be at this style

alias AddNick {
  var %r $read(acceptednicks.txt,$address($1,2))
  if (!%r) .write AcceptedNicks.txt $address($1,2)
  echo -a 7 $+ $1 is $iif(%r,already on,now added to) Accepted Nicks.
}
alias DelNick {
  var %r $read(acceptednicks.txt,$address($1,2))
  if (%r) .write -dl $readn AcceptedNicks.txt
  echo -a 7 $+ $1 is $iif(%r,deleted from,not in) Accepted Nicks.
}

and about the alias shownicks u can use loadbuf

alias ShowNicks {
  if (!$window(@AcceptedNicks)) window -znkg1 @AcceptedNicks
  loadbuf @AcceptedNicks acceptednicks.txt
}

about on open event u can use $wildsite instead of $address($nick,2)
and use $nick(#,$nick,ov) instead of ($nick isop #chan) || ($nick ison #chan) || ($nick isvoice #chan)

finaly just a sugection about your menu on/off

menu channel,menubar {
  PM Blocker
  .Set $iif(%PmBlocker == on,OFF,ON):set %PmBlocker $iif(%PmBlocker == on,off,on) | echo -a 7PM Blocker is now %PmBlocker $+ .
}
 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.