mIRC Homepage
Posted By: BoardMasta Changing the IRC Outputs - 10/11/03 12:43 AM
I have a custom output for irc text and I have bugs in it. I finally figured out how to eliminate some of the bugs but now it eliminates spaces from the messages I send. Also in the raw command I'm forced to put a space in order to have identifiers work.
Code:
on *:input:#: {
  if ($left($1, 1) == /) && ($ctrlenter == $false) return
  msg $active $1-
}

alias msg {
  echo $1 $form.selftext($1, $2-)
 raw -q privmsg $1 : $2-
}
alias form.selftext return $timestamp 04 $+ $chr(91) $+  $+ $Access($me, $active) $+  $+ $me $+ 04 $+ $chr(93) $+  $2-


I know theres some easy way I'm missing but I dont see it right now....
Posted By: LocutusofBorg Re: Changing the IRC Outputs - 10/11/03 06:20 AM
Identifiers must always be surrounded by spaces (unless they are arguments for other identifiers). To remove spaces, you can add a $+ where the space appears (since this is an identifier, also surrounded by spaces, eg test $+ one returns testone). You also might wanna add a halt at the end of your on input event.
Posted By: cold Re: Changing the IRC Outputs - 15/11/03 07:33 PM
You could just use "raw -q privmsg $1 : [color:red]$+ $2-[/color]", but you don't need the /raw command there. Simply use /msg quietly - "[color:red].msg $1-[/color]" (it will work inside your aliased /msg).

About mIRC stripping consecutive spaces that you send, there's nothing you can do about that, since it's its parsing method (a.k.a. limitation) to handle the given parameters. Everytime you use a /command (ie. /msg), mIRC will strip the consecutive spaces.
Posted By: Iori Re: Changing the IRC Outputs - 16/11/03 01:27 AM
You could just use "raw -q privmsg $1 : $+ $2-"
Just for interests sake, you could also use "privmsg $1-" with no "raw" nor ":" smile
Posted By: cold Re: Changing the IRC Outputs - 16/11/03 01:32 AM
Well why not use /.msg anyway.. :tongue:
Posted By: Iori Re: Changing the IRC Outputs - 16/11/03 01:35 AM
Well I agree, as I said, that was "Just for interests sake" grin
Posted By: cold Re: Changing the IRC Outputs - 16/11/03 01:40 AM
..Which was really interesting, I think I didn't know /privmsg was quiet by default. :tongue:
© mIRC Discussion Forums