mIRC Home    About    Download    Register    News    Help

Print Thread
L
LeperMessiah
LeperMessiah
L
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

Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Code:
on *:TEXT:!clear:#:{
  if ($nick == LeperMessiah) { msg $chan Clearing... | !clear # }
  else { msg $chan You are not my owner }
}

L
LeperMessiah
LeperMessiah
L
Ack, still doesn't work.

X
Xc0n
Xc0n
X
It should work..

Joined: Dec 2002
Posts: 334
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 334
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 }
}

L
LeperMessiah
LeperMessiah
L
I already edited that !clear part that should be /clear.

No luck..

T
theRat
theRat
T
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.

Last edited by theRat; 01/06/03 11:11 AM.
Joined: Apr 2003
Posts: 426
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
Use on INPUT instead, if you want to do this in your own mIRC.

D
Devo
Devo
D
/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!

Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
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.

L
LeperMessiah
LeperMessiah
L
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"


Link Copied to Clipboard