mIRC Home    About    Download    Register    News    Help

Print Thread
#117056 11/04/05 08:56 PM
Joined: Mar 2005
Posts: 9
M
milKeR Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Mar 2005
Posts: 9
menu channel {.Away.Away: /set %reason $?="Away reason:" | /away %reason | /name is away. Reason: %reason | /unset %reason:back. /away | /name is back from away!}

My friend sent this to me! This is some type of an away-script.. Someone who understands it??

#117057 11/04/05 10:50 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Code:
menu channel {
Away 
.Away: set %reason $?="Enter Your Away Reason:"  | away %reason | me is away. Reason: %reason
.Back: unset %reason | away | me is back from away!
}

set %reason $?="Enter Your Away Reason:"
prompts you for a reason to be away, then sets a variable to hold your reason for being away
away %reason
sends the away command to the server and includes your reason
me is away. Reason: %reason
announces in the active channel that you are away and shows your reason
unset %reason
clears the away reason from the variable
away
sends a blank away command to the server, which clears the away status and reason from your whois information
me is back from away!
announces in your active channel that you are now not away

#117058 11/04/05 10:56 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
No need for variables there.

Code:
menu channel {
  Away
  .Away:{
    away $$?="Reason:"
    me is away. Reason: $awaymsg
  }
  .Back:{
    if ($away) {
      me is back from: $awaymsg
      away
    }
  }
}


New username: hixxy
#117059 11/04/05 11:01 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
he wanted it explianed (I think that is what was asked by the OP)
My reply attempted to stay with what he had while avoiding the errors (Copy/Paste problem?)
And as the OP didnt specify what version mIRC was being used I dont see its that much of an issue.


Link Copied to Clipboard