mIRC Home    About    Download    Register    News    Help

Print Thread
#271354 22/02/23 02:47 PM
Joined: May 2022
Posts: 28
F
Fernet Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: May 2022
Posts: 28
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

Last edited by Fernet; 22/02/23 03:06 PM.
Fernet #271355 22/02/23 02:57 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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

Fernet #271356 22/02/23 03:09 PM
Joined: Jan 2014
Posts: 107
M
Vogon poet
Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
Quote
on *:TEXT:*ciao*:#:{ /msg $chan Ciao! }

You already answered your own question with this right here.

Majeye #271357 22/02/23 03:12 PM
Joined: May 2022
Posts: 28
F
Fernet Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: May 2022
Posts: 28
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

Last edited by Fernet; 22/02/23 03:29 PM.

Link Copied to Clipboard