mIRC Homepage
Posted By: sigbin input halt - 04/05/10 02:34 AM
is this right? i cant seem to make it work

Code:
on 1:INPUT:?:{
  if (lol isin $1-) { halt
    else /say *£aughing Out £oud*
  }
}


its like when i input " lol " it will be halted and instead of lol i will message " *£aughing Out £oud* "
Posted By: landonsandor Re: input halt - 04/05/10 03:59 AM
Code:
on 1:INPUT:?:{
  if (lol isin $1-) { halt
    else /say *£aughing Out £oud*
  }
}


That halts if there's a match. If you WANT it to do the custom laughing out loud, you'd need:

Code:
on 1:INPUT:?:{
  if (lol isin $1-) { /say *£aughing Out £oud* }
}


you have 1 condition with 2 commands and the first one is HALT, that will NEVER fire off like that
Posted By: Tomao Re: input halt - 04/05/10 06:16 AM
Your code will result in:
Quote:
<nick> *£aughing Out £oud*
<nick> that is funny lol


I will recommend you do it like so:
Code:
on *:input:*:{
  if ((/* !iswm $1) && (!$ctrlenter) && (!$inpaste)) {
    say $replace($1-,lol,*£aughing Out £oud*) | halt
  }
}
This will correctly result in:
Quote:
<nick> that is funny *£aughing Out £oud*
Posted By: sigbin Re: input halt - 04/05/10 06:38 AM
thankz for the help people... very much appreciated

but i noticed when i change "lol" to brb it wont work? how come?

Posted By: Tomao Re: input halt - 04/05/10 07:29 AM
For example:
Code:
on *:input:*:{
  if ((/* !iswm $1) && (!$ctrlenter) && (!$inpaste)) {
    say $replace($1-,lol,*£aughing Out £oud*,be right back,brb) | halt
  }
}
This will change "be right back" to "brb"
Posted By: Riamus2 Re: input halt - 04/05/10 12:13 PM
I think the OP probably wants brb to change to be right back rather than the other way around.

To the OP, in the previous code, just swap brb and be right back around.
Posted By: 5618 Re: input halt - 04/05/10 12:31 PM
I think his real problem is that he's copying the complete on INPUT event, which causes a duplicate script.
Posted By: Riamus2 Re: input halt - 04/05/10 12:37 PM
True. I was just pointing out the correction for what was given so the OP doesn't try it and think that brb isn't working still.
© mIRC Discussion Forums