Away System

By Sharky_Dude on Jul 21, 2011

Okay, here is my away system. It works fine, although I haven't done everything to it that I'm going too. I will keep this post updated as I make changes. Special thanks goes out to blackvenom, and thanks to everyone who helped me @ irc.VampIRC.net

Okay so first of all you are going to want to go into the on text event and delete the delete this and put in your real name or nick and do as it says.

Also when you use the /away for the first time don't forget to give a reason, and a popup box will appear asking you to set your away nickname. do that then click okay, and from now on you just type /away reason and you be be set to away and your nickname will change automatically.

when you come back type /back and it will set your nickname back to the one you was using, tell your away reason again and how long you was gone.

***fixed some bugs

On *:input:*:{
  If ($1 == /away) {
    If (!%away) {
      If (%awaynick == $null) { set %awaynick $$?="Enter your away nick"
        Away $2-
        Set %awayreason $2-
        amsg I am currently away %awayreason
        Set %away 1
        Set %normalnick $me
        Tnick %awaynick
      }
      else {
        Away $2-
        Set %awayreason $2-
        amsg I am currently away %awayreason
        Set %away 1
        Set %normalnick $me
        Tnick %awaynick
      }
    }
  }
  Elseif (!%awayreason) {
    Set %awayreason No reason given.
  }
  Elseif ($1 == /back) {
    Back
  }
}
On $*:text:$(/\b( $+ $me $+ |***delete this and put in your real name or nick***\b/iS):#:{
  If (%away) {
    .notice $nick I am currently away - Reason: %awayreason
  }
}
Alias back {
  if (!%away) {
    halt
  }
  else {
    Away
    .privmsg # I am back - Away Reason: %awayreason ( $+ $duration($awaytime) $+ )
    echo -a $asctime(mm/dd/yy h:nn tt) « $+ $me $+ » I am back - Away Reason: %awayreason ( $+ $duration($awaytime) $+ )
    Unset %away
    Unset %awayreason
    Nick %normalnick
    Halt
  }
}

Comments

Sign in to comment.
napa182   -  Jul 22, 2011

Its all good Sharky_Dude everyone starts somewhere. Just keep at it an soon you will get it down.

 Respond  
Sharky_Dude   -  Jul 22, 2011

Okay napa182, I didn't realize you could do it that way nice :D but hey people I chat with on a normal basis such as those on my own server, all call me Tom so ya, that's why I had done it that way. I am a bit of a newb, and a little slow at learning. I almost always have /help open lol. so when I code, and 85% of this is mine, I don't know what all I can do with stuff. I just learned a little about variables with this snippet.

 Respond  
napa182   -  Jul 22, 2011

wouldn't they call you by ur main nick or your away nick?
anyways no real need to set global vars for the away bit maybe make use of $awymsg
example only:

On $*:text:$(/\b( $+ $me $+ | $+ $mnick $+ )\b/iS):#:{ 
  if  ($away && !$($+(%,away,$wildsite),2)) { inc -u60 $+(%,away,$wildsite)
    .notice $nick I am currently away - Reason: $awaymsg
  }
}
On *:input:#:{
  If ($1 == away && !$away) {
    haltdef
    tnick $$?="Enter your away nick"
    .Away $$?="Enter your away message"
    msg # I am currently away - Reason: $!
  }
  elseif ($1 == back && $away) {
    haltdef
    msg # I am back - Away Reason: $awaymsg ( $+ $duration($awaytime) $+ )
    mnick $mnick
    .away
  }
}
 Respond  
Sharky_Dude   -  Jul 21, 2011

Jethro_ is this a test? I know your nickname and I know you can code, hell allot better than I can but when you go away this snippet changes your nickname thus $me isn't what people know you as anymore is it? So, if my nickname is SharkyDude, and my away name is T[o]m, my real name is Tom. If someone says hey Tom and I'm away, it wont notice them that I am away if I only include $me. Also I had to go this rout because people like me, my real name is only 3 letters so if someone would say tomato it doesn't tell that person that I'm away. Thank you Jethro however for giving it a look over.

 Respond  
Jethro   -  Jul 21, 2011

delete this and put in your real name or nickWhy do you need to mention and include it? $me will always return your main nickname.

Last but not least, though, there's $away identifier available, as well as /tnick command. You're sort of going the extra mile to set the global variable checks.

 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.