Simple away system with dialog,multiserv

By Storm2108 on Jul 05, 2007

Updated: Now including Logging and multiserv.

menu menubar,channel,status { 
  Away System:dialog -m awayy awayy
}
dialog awayy {
  title "Away System"
  size -1 -1 78 48
  option dbu 
  check "Multiserv",1 , 0 0 32 12, flat
  check "Logging", 6, 0 12 32 12, flat
  edit "Reason here.",2 , 32 0 46 12, flat
  edit "Away nick here.", 3, 32 12 46 12, flat
  button "Away", 4, 0 36 39 12, flat
  button "Back", 5, 39 36 39 12, flat
  edit "Orignal nick.", 7, 32 24 46 12, flat
}
on *:dialog:awayy:sclick:4:{ 
  set %logging $did(6).state
  set %multi $did(1).state
  set %reason $did(2)
  set %anick $did(3)
  set %nick $did(7)
  awayy
}
on *:dialog:awayy:sclick:5:{
  back
}
alias awayy {
  if (%multi == 1) && (%logging != 1) {
    scon -a ame is now away [Reason: %reason ] [Logging: Off] 
    scon -a nick %anick
    scon -a away $+($chr(91),%reason,$chr(93))
  }
  elseif (%multi != 1) && (%logging == 1) {
    ame is now away [Reason: %reason ] [Logging: On]
    nick %anick
    away [ %reason ]
  }
  elseif (%multi == 0) && (%logging == 0) {
    ame is now away [Reason: %reason ] [Logging: Off]
    away [ %reason ]
  }
}
alias back {
  if (%multi == 1) && (%logging != 1) {
    scon -a ame is now back [Reason: %reason ] [Logging: Off]
    scon -a nick %nick
    unset %nick %anick %multi %logging 
    scon -a away
  }
  elseif (%multi != 1) && (%logging == 1) {
    ame is now back [Reason: %reason ] [Logging: On]
    nick %nick
    unset %anick %nick %multi %logging
    away
  }
  elseif (%multi == 0) && (%logging == 0) {
    ame is now back [Reason: %reason ] [Logging: Off]
    away
  }
}
on *:text:*:#:{
  if ($me isin $1-) && (%logging == 1) {
    window @Logging
    echo @Logging Log: $nick said your nickname on $chan on $date at $time(hh:nn:sstt) they said $1-
  }
}
}
on *:text:*:?:{
if (%logging == 1) {
  window @Logging 
  echo @Logging Log: $nick PMed you on $date at $time(hh:nn:sstt) they said $1-
}
}
}

Comments

Sign in to comment.
Xemnas   -  Jul 05, 2007

ROFL Saurabh. Nice snip Storm. :)

 Respond  
Lindrian   -  Jul 05, 2007

Shadow, Id be more then happy to see him hacking the server I am on.
Storm2108:
I am on:

  1. Irc.undernet.org
  2. Irc.quakenet.org
  3. Irc.deltaanime.net
 Respond  
Storm2108   -  Jul 05, 2007

Lindrian btw what server do you go on?

 Respond  
Storm2108   -  Jul 05, 2007

Fixed.

 Respond  
Lindrian   -  Jul 05, 2007

The script itself is very bad. You\'rea cually not going Away in the script...
And you can unset multiple items in 1 line.
unset %test %test1 %test2 etc.

Go look at other away systems and learns from their misstakes.

 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.