mIRC Home    About    Download    Register    News    Help

Print Thread
#139957 20/01/06 10:36 AM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Hi, I've been testing some things with mIRC, customizing it how I like it etc, however, I have found a problem and request some help in resolving it.

Code:
 on 1:INPUT:#:{
  echo -t # 0 $+ OUT : $me : $1-
  haltdef
} 


I currently use that, however I cannot use slash commands, as they just appear as messages.
E.G: If I type /server or /me in a channel window, they will be messages for everyone to see.

Anyone suggest a way around it?

Thanks, Dertikter.

#139958 20/01/06 10:41 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
You need to use an if statement to check that the line does not start with a /. You can do this by using the iswm operator.

Example:

on *:input:#:{
if (/* !iswm $1-) {
commands
haltdef
}
}


Another common parameter to check is that CTRL+Enter was not pressed. CTRL+Enter is a key combo in mIRC to send lines to a channel that start with a /, without executing it as a command. In this case, change the if statement to:

if (/* !iswm $1-) && (!$ctrlenter) {

See /help if then else for further information smile

Regards,


Mentality/Chris
#139959 20/01/06 01:21 PM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Thanks, I didn't even think about using wildcards.

Thanks again, Dertikter.
*EDIT*

Another issue that I didn't even think of.. :|
Now that I have echo and haltdef in there, the message never actually gets sent to the server/channel, I put msg $active $1- in there, but now I get the message twice due to the echo, is there a way to "ghost message" where it doesn't show your message but they are still sent, so my echo would effectively show my text?

Thankyou in advance, Dertikter.

Last edited by Dertikter; 20/01/06 01:43 PM.
#139960 20/01/06 02:03 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
To have only the ECHO show your text, use (as in your example):

/.msg $active $1-

The DOT silences the command


Those who fail history are doomed to repeat it
#139961 20/01/06 02:15 PM
Joined: Nov 2004
Posts: 21
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2004
Posts: 21
Works perfectly, thankyou to you both. smile


Link Copied to Clipboard