mIRC Homepage
Posted By: RODF Emoticon - 19/06/03 10:48 PM
When I write a phrase with emoticon coloring, it appears a time. But when it has only emoticon, it appears 2 times, the coloring and the original. How I make to correct this? It has something made a mistake in input below?

on 1:INPUT:*:{ if (%happy isin $1 -) { /say $replace($1-, %happy, %happyc) | halt }
}

Sorry my english
Posted By: pheonix Re: Emoticon - 20/06/03 08:56 AM
change halt to haltdef
Posted By: KingTomato Re: Emoticon - 20/06/03 08:59 AM
*sigh* ignore pheonix... haltdef is to halt DEFAULT text (i.e. when you are using the ^ prefix on an event) To fix it, just use..

Code:
on 1:INPUT:*:{
  if ($lefT($1, 1) != $readini(mirc.ini, text, commandchar)) {
    /say $replace($1-, %happy, %happyc)
    /halt
  }
} 

Posted By: pheonix Re: Emoticon - 20/06/03 09:03 AM
lets just say this has no problems working ;p

on *:INPUT:#:{
msg # $replace($1-,a,å,b,ß,c,ç)
haltdef
}
Posted By: codemastr Re: Emoticon - 20/06/03 03:10 PM
It doesn't?
/msg nickserv identify mypassword
Your script:
/msg #currentchan /msg nickserv identify mypassword


Yea I don't see any problems there!
Posted By: pheonix Re: Emoticon - 20/06/03 03:12 PM
erm what?
what does that have to with haltdef?
Posted By: codemastr Re: Emoticon - 20/06/03 03:20 PM
You didn't say "haltdef has no problems working" you said the script itself has no problems working. Hence, you were wrong. I don't care whether haltdef works, I'm informing everyone that they should NOT use the code you pasted unless they like the idea of their passwords being visible to everyone.
Posted By: pheonix Re: Emoticon - 20/06/03 03:23 PM
o i see what you mean now
easily fixed.

on *:INPUT:#:{
if ($left($1-,1) != /) {
msg # $replace($1-,a,å,b,ß,c,ç)
haltdef
}
}

Posted By: KingTomato Re: Emoticon - 20/06/03 05:59 PM
thats what i had originaly dumb[sel-censored] I have say so if the target is a query, channel, or dcc--it will work.. But no, you have to try and confuse the user.. Anyways, what if I change my commad prefix to @ I like to use @echo now, now how does your script check for a command prefix?
Posted By: pheonix Re: Emoticon - 20/06/03 06:09 PM
wha
Posted By: KingTomato Re: Emoticon - 20/06/03 06:38 PM
What if i change the command in Options>>[+]-General top says "Prefix"
Posted By: pheonix Re: Emoticon - 20/06/03 06:48 PM
wha:|
Posted By: Collective Re: Emoticon - 20/06/03 06:52 PM
You forgot that even if you change the command prefix from / that / will still work smile.
Posted By: KingTomato Re: Emoticon - 20/06/03 07:13 PM
yes, but will not triggers theuser's new preference.
Posted By: Collective Re: Emoticon - 20/06/03 07:27 PM
I emant you would need to combine both your script and phoenix's with an or for it to work perfectly..
Posted By: KingTomato Re: Emoticon - 20/06/03 07:30 PM
If a user changes their preference, why would it need to account for the default method? They aren't going to change it, the continue to go on with the default method, now would they? >:D
Posted By: Collective Re: Emoticon - 20/06/03 07:31 PM
Maybe they would do it accidentally/out of habit? Perhaps simply copy a command from a webpage and not want to bother changing the / to what they normally use?
Posted By: Cassius Re: Emoticon - 21/06/03 06:57 PM
Code:
on 1:INPUT:*:{
  if (/ != $left($1-,1) {
    if (%happy isin $1-) { 
     msg $active $replace($1-, %happy, %happyc) | halt 
    }
   }  
}

my take.
Posted By: KingTomato Re: Emoticon - 21/06/03 07:04 PM
Cassius, msg $active will not always work because you have DCC chats that requery =$nick for instance. Also why even bother to check if the string is listed, and not just go through with the replace. Im sure the $replace has a condition in it already to check, here your just wasting that .0000001 second of resource. >:D

Code:
on 1:INPUT:*: {
  if ($left($1, 1) !isin $+(/,$readini($mircini, text,commandchar))) {
    /say $replace($1-, %happy, %happyc)
    /halt
  }
}


Say will work just fine covering all possible windows.
Posted By: ScatMan Re: Emoticon - 22/06/03 04:05 AM
u wrong, $active in dcc chat will return =nick.
Cassius, better to do /say or /msg $target so if u type this command not from the window (like /editbox -n #channel hi)
it will send the msg to the target and not the active window.

Posted By: RODF Re: Emoticon - 22/06/03 02:17 PM
I made tests, nothing here moved, emoticon:) it correctly appears a time, when it is with a word or phrase,
Example:
Hello:)
But when emoticon is written only, it leaves 2 times, the coloring and the original. I only want that it does not appear 2 times when written only emoticon, but so far did not obtain: ( I did not understand the command presented for KingTomato, what I would place in text and to commandchar?
© mIRC Discussion Forums