Tokensoup commented on a Page, Weather Bot  -  Jan 02, 2008

Oh, what I meant by my previous comment was, a user will receive errors if they don\'t send this to the active channel. What I would do for /weatherm is something like this:

alias weatherm {
  if ($1 isnum) && ($len($1) == 5) && ($active ischan) {
  weather $1 | set %we.chan $chan }
  elseif ($active !ischan) { echo -a Invalid window. (Use a channel window) }
  else {
    echo -a Incorrect zip code format.
  }
}

Giving the user information on the proper use of the alias. Or you can have your socket echo the information into the active window instead of msging to %we.chan if the active window isn\'t a channel.

 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.