mIRC Homepage
Posted By: uid Adding automaticly a dot. - 28/04/04 12:28 PM
Hi!
I'm using mIRC 6.14 and I want to have a script that does this:
When I write in a channel and sends my msg I want the script to automaticly add a dot after the thing I have written.

Example:
In the channel "#oki" I write "ok, thanks" and sends it and the scripts adds a dot to the quote and when everybody recieves it it looks like this - "ok, thanks."

Is that possible? I hope you understood what i meant.
Posted By: Hammer Re: Adding automaticly a dot. - 28/04/04 12:36 PM
Assuming you have no other on INPUT events in your remote scripts (Alt+R), adding the following snippet will do what you need. If you do have other on INPUT events, you will have to modify them to include adding the $+ . as shown in each event.

on *:INPUT:#: if /* !iswm $1 && !$ctrlenter { say $1- $+ . | halt }
Posted By: tidy_trax Re: Adding automaticly a dot. - 28/04/04 01:56 PM
i'm guessing you already knew, but not everyone uses / as the command prefix, this would be better imo:

Code:
on *:INPUT:#: if $left($1,1) != $readini($mircini,text,commandchar) && !$ctrlenter { say $1- $+ . | halt }
Posted By: Iori Re: Adding automaticly a dot. - 28/04/04 02:56 PM
I'm guessing you don't know that no matter what is set in options, / is always a command prefix.
  • if $left($1,1) !isin / $readini($mircini,text,commandchar) && ...


However, i am of the opinion that scripting for the obscure is unnecessary, the very few people who have a different commandchar should know they have set one, and so adjust such a script accordinglly.
Posted By: Wolfie Re: Adding automaticly a dot. - 28/04/04 04:50 PM
Quote:
on *:INPUT:#: if /* !iswm $1 && !$ctrlenter { say $1- $+ . | halt }

Code:
on *:INPUT:#: if /* !iswm $1 && !$ctrlenter && $right($strip($1-),1) != . { say $1- $+ . | halt }

smile Just in case they include the . themselves, it won't add another one. grin

And the "/" debate reminds me of another feature request...
Posted By: tidy_trax Re: Adding automaticly a dot. - 28/04/04 05:16 PM
i didn't know that, thanks smile
© mIRC Discussion Forums