Away System

By F*U*R*B*Y* on Apr 26, 2007

Just a simple Away System, type /away to open it up

alias away { dialog -m away_system away_system | halt }

dialog away_system {
  title "Paul's Away System"
  size -1 -1 191 74
  option dbu

  tab "Configuration", 1, -1 -2 190 51
  check "Logger", 101, 4 17 50 10, tab 1
  check "Pager", 102, 4 28 50 10, tab 1
  check "Set Auto Away after 30 minutes", 103, 4 39 90 10, tab 1

  tab "Nick Change", 2
  text "Current Nickname", 201, 2 18 46 8, tab 2
  edit "", 202, 53 17 50 10, read tab 2
  text "Away Nickname", 203, 3 28 45 8, tab 2
  edit "", 204, 53 27 50 10, tab 2

  tab "Message Format", 3
  edit "Is now away dued to: <away.reason> pager: <away.page.status> Gone at: <away.time>", 301, 4 21 182 13, tab 3

  tab "Reasoning", 4
  list 401, 23 14 137 34, tab 4 size vsbar

  tab "Set Away/Back", 5
  button "Set Away", 501, 45 23 37 12, tab 5
  button "Set Back", 502, 97 23 37 12, tab 5

  edit "", 6, 3 52 106 19, read, multi
  text "Made by", 7, 113 53 25 8
  link "X-Static Codes", 8, 113 62 39 8
  button "Advertise", 9, 153 52 37 12
}

on *:DIALOG:away_system:*:*: {
  if ( $devent == init ) {
    echo -a 03Now opening Pauls Away System
    did -a away_system 202 $me
    did -a away_system 401 Eating
    did -a away_system 401 Sleeping
    did -a away_system 401 School
    did -a away_system 401 TV
    did -a away_system 401 Adding more Reasons, To come in
    did -a away_system 401 Version 2
  }
  else if ( $devent == mouse ) {
    if ($did == 8) { did -r away_system 6 | did -a away_system 6 This will open my website }

    else if ($did == 101) { did -r away_system 6 | did -a away_system 6 This will log everything said when you are away }
    else if ($did == 102) { did -r away_system 6 | did -a away_system 6 This will allow people to page you }
    else if ($did == 103) { did -r away_system 6 | did -a away_system 6 This will automaticly set you as away after 30 minutes of idle }

    else if ($did == 202) { did -r away_system 6 | did -a away_system 6 This is your Current Nickname }
    else if ($did == 204) { did -r away_system 6 | did -a away_system 6 This is the Nickname you will use }

    else if ($did == 301) { did -r away_system 6 | did -a away_system 6 This is how you will message the channel }

    else if ($did == 401) { did -r away_system 6 | did -a away_system 6 This is the Reasoning for why you are away }

    else if ($did == 501) { did -r away_system 6 | did -a away_system 6 This is to set you away }
    else if ($did == 502) { did -r away_system 6 | did -a away_system 6 This is to set you Back }
  }
  else if ( $devent == sclick ) {
    if ($did == 9) { scon -a amsg I am using Pauls Away System | scon -a amsg Get it at http://xstatic.webtastix.co.nz/ Today! }
    else if ($did == 501) {
      if (!%away) {
        set %old.nick $me
        set %away.nick $did(204)
        set %away yes
        set %away.time $ctime
        if ($did(101).state) {
          set %away.log on
        }
        else {
          set %away.log off
        }
        if ($did(102).state) {
          set %away.pager on
        }
        else {
          set %away.pager off
        }
        set %away.format $did(301)
        set %away.reason $replace(%away.format,<away.reason>,$did(401).seltext,<away.page.status>,%away.pager,<away.time>,$time(hh:mm:sstt))
        away %away.reason
        nick %away.nick
        /amsg %away.reason
      }
      else {
        echo -a 04Error: You are currently Away
      }
    }
    else if ($did == 502) {
      if (%away) {
        away
        nick %oldnick
        /amsg is now back, Total time gone: $duration($calc($ctime - %away.time))
        unset %away*
      }
    }
  }
}
CTCP *:pager: {
  if (%away) && (%pager == on) {
    ctcpreply $nick PAGER Your Page, has been Received
    write page.txt $timestamp $nick paged me about $1-
  }
  else {
    ctcpreply $nick PAGER I am not Away or my Pager is not turned on
  }
}

Comments

Sign in to comment.
Lindrian   -  Apr 27, 2007

I dont know what u updated, most errors are still there. And you need to fix ur init event. /help dialogs

Secondly:

-

  • /dialog: \'away_system\' name in use (line 1, away.mrc)
  • ;When i pressed back while not connected.
    Error: You are currently Away
    ;When i pressed away while not connected.

  • /amsg: not connected to server
  • ;While pressing advertise when im not connected.

Secodnly, your edit boxes lack, as they cut ur awa message off.
So, none of your functions works dude...

Needs lots of improvements

 Respond  
F*U*R*B*Y*   -  Apr 27, 2007

updated errors

 Respond  
Lindrian   -  Apr 27, 2007

umm, Kinda annoying that u made the advertisement /amsg...
Then,
[07:19] <@tester> Is now away dued to: pager: Gone at:
$away status: $false

So acually, this is no away system.
IM sorry, but you don\'t even go away properly on it. Away is still $false

And then, when i did anything basically, it didnt save the settings.
Like, I pressed to enable pager, went away. Reopened the dialog, and its not there.

I like the idea with the mouse though, but it can be remade by using

did -ra $dname ID <text>

Too bad it\'s limited on away reasons ;/..

And i think you could have fit all of the settings in one dialog, instead of using a few tabs..

You also need a few more if\'s to check what the settings are, so the script will process properly.

You also miss alot of INIT events, so make your dialog work properly.

IM sorry, but I didnt like this at all.
Lack of basic functions and too many issues with the snippet.

I\'ll keep you up to date with the issues i encounter.

 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.