mIRC Homepage
Posted By: Fernet on *:TEXT - 22/02/23 02:47 PM
Hello everybody and thanks in advance
-----------------------
on *:TEXT:*ciao*:#:{ /msg $chan Ciao! }

ON = mean When this happen
* = mean everyone can do it
TEXT = is clear, in this case any word with CIAO included
# = You can add a channel or will work in any channel
/msg $chan Ciao! = The output will be a message Ciao!
-----------------------
What can I do if I want that it happen ONLY if I write CIAO?
I mean: I wish everyone may write CIAO and nothing happen, but if I write it (ONLY ME), then I have the output. Is it possible?
I hope I been clear.
Thanks again
Regards
Posted By: maroon Re: on *:TEXT - 22/02/23 02:57 PM
have a look at the F1 help or https://en.wikichip.org/wiki/mirc/on_events/on_input
in this event, you want to check
if ($1- == ciao) {
code goes here
}

What you type would have gone into the channel anyways, so if you're wanting to change your message, such as adding color, you'll need to include a HALT to prevent the normal message from going out in addition to what your script does

That being said, this word is over-used by karaoke bots, and can earn someone a ban from some channels if they stay this word shortly after entering the channel.

Also, if your idea is to automatically reply a greeting to someone else saying a greeting, you must be careful about that, or this can go into an infinite loop if 2 people have the same reply-to-same-greeting script, lol
Posted By: Majeye Re: on *:TEXT - 22/02/23 03:09 PM
Quote
on *:TEXT:*ciao*:#:{ /msg $chan Ciao! }

You already answered your own question with this right here.
Posted By: Fernet Re: on *:TEXT - 22/02/23 03:12 PM
Originally Posted by Majeye
Quote
on *:TEXT:*ciao*:#:{ /msg $chan Ciao! }

You already answered your own question with this right here.

Doing this,everyone (marked with *) write CIAO has output Ciao! I wish it happen only when I write it
Of course my suppose is to change the output with something else. I simply need I'm the only one who can write that command (now known as CIAO, but it can be for example STOP)
Thanks for answering sir
© mIRC Discussion Forums