Little Away System :)

By Stefke on Mar 02, 2010

This is my first Away System. It is very simple. Maybe not the best made, but what to do:) Have a nice chat, good luck!

Little Help. :)

To open dialog type:/aways :)
If there are some problems you can contact me at:
mIRC - irc.krstarica.com , Nick - Stefke
With e-mail: stefke96@gmail.com .

Thanks ! :))))

################
#  Away System #
#              #
#     by       #
#              #
#   Stefke     #
################

alias aways { dialog -m aways aways }
dialog aways {
  title "Away System by Stefke [/aways]"
  size -1 -1 136 136
  option dbu
  text "Away Reason", 1, 2 14 43 9
  edit %razlog, 2, 2 26 88 15
  text "Away Nick", 3, 2 74 65 11
  edit %anick, 4, 2 87 90 16
  text "Your Nick", 5, 2 44 45 10
  edit %mnick, 6, 1 55 91 15
  button "Go Away", 7, 2 109 37 15
  button "Back Away", 8, 96 109 37 15
  button "Ok/Close", 9, 47 117 42 16, ok cancel
}
on 1:dialog:aways:sclick:*: {
  set %razlog $did(aways,2).text 
  set %anick $did(aways,4).text
  set %mnick $did(aways,6).text
  if ($did == 7) { nick %anick | /away %razlog | /ame is away Time: $time , Reason: %razlog , Log:Yes , Pager:No }
  if ($did == 8) { nick %mnick | /away  | /ame is back from away Reason: %razlog , Duration: ( $+ $duration($awaytime) $+ ) }
}

Comments

Sign in to comment.
napa182   -  Mar 02, 2010

dialog is a bit huge =/

also you could do something like this to get away from setting global vars
but w/e

keep up the msl scripting...

dialog FU_Away {
  title "FU_Away"
  size -1 -1 108 48
  option dbu
  box "Away/Back", 1, 2 2 104 23
  button "Away", 2, 4 11 50 12, flat
  button "Back", 3, 54 11 50 12, flat
  box "Away message", 4, 2 26 104 20
  edit "", 5, 4 35 100 9, autohs
}
menu menubar,channel {
  .FU_Away:{ dialog $iif($dialog(FU_Away),-v,-md FU_Away) FU_Away }
}
on *:dialog:FU_Away:init:0:{ did -b $dname $iif($away,$+(2,$chr(44),5),3) }
on *:dialog:FU_Away:sclick:*:{
  if ($did == 2) { 
    .away $iif($did(5),$did(5),Away)
    amsg I am Away Time: $time(h:nn-tt) Reason: $iif($did(5),$did(5),Away)
    .nick $+($me,[Away])
    did -b $dname 2,5
    did -e $dname 3
  }
  if ($did == 3) {
    .away
    amsg I am Back: Gone for $duration($awaytime) Reason: $awaymsg
    .nick $remove($me,[Away])
    did -e $dname 2,5
    did -b $dname 3
    did -r $dname 5
  }
}
 Respond  
SnoooP   -  Mar 02, 2010

You should perhaps use a menu to open the dialog instead of typing /aways.. Just my opinion anyway

 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.