mIRC Homepage
Posted By: LeperMessiah Can you help me on this screen clearer? - 01/06/03 12:34 AM
on 1:TEXT:!clear:#:if ($nick == LeperMessiah) { /msg $chan Clearing... | /clear } | else { /msg $chan You are not my owner }

Can you tell me what's wrong with this? Here is a rundown of what I want it to do.

In any channel, when I (My nickname is LeperMessiah. My script's name is different.) type !clear, I want my script to check if my name is LeperMessiah. If it is, he says "Clearing..." then clears the screen. If it is not me, I want him to message the channel saying "You are not my owner."

But this code is not working..Can anyone tell me what the code should look like? grin
Posted By: Nimue Re: Can you help me on this screen clearer? - 01/06/03 01:05 AM
Code:
on *:TEXT:!clear:#:{
  if ($nick == LeperMessiah) { msg $chan Clearing... | !clear # }
  else { msg $chan You are not my owner }
}
Ack, still doesn't work.
Posted By: Xc0n Re: Can you help me on this screen clearer? - 01/06/03 09:09 AM
It should work..
Try this one...
Code:
  
on *:TEXT:!clear:#:{  
if ($nick == LeperMessiah) { msg $chan Clearing... | [color:red]/[/color]clear # }  
else { msg $chan You are not my owner }
}
I already edited that !clear part that should be /clear.

No luck..
Posted By: theRat Re: Can you help me on this screen clearer? - 01/06/03 11:10 AM
how do you test it?

/help on text
Note: You can't test out these events by typing text to yourself. They can only be initiated by someone else saying something in a channel or in a private message.
Posted By: neophyte Re: Can you help me on this screen clearer? - 01/06/03 12:37 PM
Use on INPUT instead, if you want to do this in your own mIRC.
Posted By: Devo Re: Can you help me on this screen clearer? - 01/06/03 03:11 PM
/clear only works on your own screen, so if you have it on a bot you will not see any effect other than it saying 'Clearing'. Neophyte's suggestion is probably what you want to do, as that way you clear your own screen!
Posted By: Nimue Re: Can you help me on this screen clearer? - 01/06/03 04:19 PM
I put !clear and not clear in case you had a 'clear' alias. the ! makes mIRC use its own command in preference to an alias of the same name. Note that as Devo said, this would clear BOTS chanel window and not yours.
I've already figured out the problem.

And by the way, I was on a different screen saying it to my IRC so it would clear itself when it's lagging. So I needed an on TEXT event. Anyway, like I said I found the problem and it works now. The problem was I had Vincula on and "Show User's Colors" was checked, and IRC adds that control+K thing to the beginning of the incomming text if you put it in remote. So I wasn't sending "!clear", I was sending "[]1,0!Clear"
© mIRC Discussion Forums