mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Emoticon #31051 19/06/03 10:48 PM
Joined: Dec 2002
Posts: 24
R
RODF Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 24
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

Re: Emoticon #31052 20/06/03 08:56 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
change halt to haltdef


new username: tidy_trax
Re: Emoticon #31053 20/06/03 08:59 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
*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
  }
} 



-KingTomato
Re: Emoticon #31054 20/06/03 09:03 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
lets just say this has no problems working ;p

on *:INPUT:#:{
msg # $replace($1-,a,,b,,c,)
haltdef
}


new username: tidy_trax
Re: Emoticon #31055 20/06/03 03:10 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
It doesn't?
/msg nickserv identify mypassword
Your script:
/msg #currentchan /msg nickserv identify mypassword


Yea I don't see any problems there!

Re: Emoticon #31056 20/06/03 03:12 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
erm what?
what does that have to with haltdef?


new username: tidy_trax
Re: Emoticon #31057 20/06/03 03:20 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Re: Emoticon #31058 20/06/03 03:23 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
o i see what you mean now
easily fixed.

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


Last edited by pheonix; 20/06/03 03:26 PM.

new username: tidy_trax
Re: Emoticon #31059 20/06/03 05:59 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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?


-KingTomato
Re: Emoticon #31060 20/06/03 06:09 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
wha


new username: tidy_trax
Re: Emoticon #31061 20/06/03 06:38 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
What if i change the command in Options>>[+]-General top says "Prefix"


-KingTomato
Re: Emoticon #31062 20/06/03 06:48 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
wha:|


new username: tidy_trax
Re: Emoticon #31063 20/06/03 06:52 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
You forgot that even if you change the command prefix from / that / will still work smile.

Re: Emoticon #31064 20/06/03 07:13 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
yes, but will not triggers theuser's new preference.


-KingTomato
Re: Emoticon #31065 20/06/03 07:27 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I emant you would need to combine both your script and phoenix's with an or for it to work perfectly..

Re: Emoticon #31066 20/06/03 07:30 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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


-KingTomato
Re: Emoticon #31067 20/06/03 07:31 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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?

Re: Emoticon #31068 21/06/03 06:57 PM
Joined: Dec 2002
Posts: 20
C
Cassius Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 20
Code:
on 1:INPUT:*:{
  if (/ != $left($1-,1) {
    if (%happy isin $1-) { 
     msg $active $replace($1-, %happy, %happyc) | halt 
    }
   }  
}

my take.


"Illegitimati non Carborundum" -> "Don't let the bastards grind you down."
Re: Emoticon #31069 21/06/03 07:04 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
Re: Emoticon #31070 22/06/03 04:05 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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.


Last edited by ScatMan; 22/06/03 04:07 AM.
Page 1 of 2 1 2