Jump to content

Event: Notice; Problem: If statements


Josh`

Recommended Posts

on ^*:notice:*:*:{
 if ($1- == "AWAY") { 
   echo # $nick is now away.
 }
 if ($1- == "BACK") {
   echo # $nick has returned.
 }
 else {
   echo # - $+ $nick $+ - $1-
 }
 haltdef
}

 

I'm having problems with this. I don't know why, but it just won't work lol.. Is there some kind of syntax wrong or if statement not correct in it? smile.gif

 

Thanks in advanced!

~Josh`

Link to comment
Share on other sites

This is correct code

 

on ^*:NOTICE:*:#: {
 if ($1 == AWAY) && (!$2) { echo $chan $nick is away. | halt }
 if ($1 == BACK) && (!$2) { echo $chan $nick  has returned. | halt }
else { echo $chan $nick $1- | halt }
}

Link to comment
Share on other sites

Thank you biggrin.gif Ozzy's works better because of what he said in ChatsUSA lobby.

 

(ozzy10) what happens if someone sends a notice and says "away for now"

(ozzy10) then it will see that as a notice of away

(ozzy10) when its not

(ozzy10) not

 

Just to give some people information on why Ozzy's is better who are having the same problem as me smile.gif

 

Thanks again guys biggrin.gif

 

~Josh`

Link to comment
Share on other sites

  • 2 weeks later...
Guest Brock

I dun get it blink.gif meh.....

 

btw why not just use RAWS for when they go away?? I beleive my nicklist(IRCx Version Coded 2 Yrs Ago) uses Raws.

 

**Goes and reads his Nicklist Codes**

 

If I find I give wink.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...