mIRC Home    About    Download    Register    News    Help

Print Thread
A question about spaces in msg. #257639 30/04/16 09:46 PM
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
Hello I would like to include spaces before my msg because twitch will otherwise say its identical to the prev message.

Code:
on *:text:*hello*:#: {
  if (%flood) { return }
  set -u4 %flood On
  msg $chan (space)(space)hi $nick
}


But it will automaticly remove the spaces
msg $chan hi $nick

How do I make it so the spaces will also send?

Re: A question about spaces in msg. [Re: TUSK3N] #257643 01/05/16 04:39 AM
Joined: Feb 2011
Posts: 311
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 311
You could use spaces.dll that can be found here http://www.xise.nl/mirc/ . You will need to download a new version every time you upgrade mIRC. I just put the .dll in the same folder as mirc.exe. Make sure you read the README.txt.

Example:
Code:
on *:text:*hello*:#: {
  if (%flood) { return }
  set -u4 %flood On
  $dll(spaces.dll, send, PRIVMSG $target : $+ $chr(32) $+ $chr(32) $+ hi)
  $dll(spaces.dll, echo, -aitc own $+(<,$me,>) $chr(32) $+ $chr(32) $+ hi)
}


Code:
[00:14:16] <KindOne> hello
[00:14:16] <SomeBot>   hi


http://www.xise.nl/mirc/wiki/doku.php/doku.php?id=spaces
http://www.xise.nl/mirc/wiki/doku.php?id=spacealt


irc.swiftirc.net #msl (mIRC Scripting Language)
Re: A question about spaces in msg. [Re: TUSK3N] #257644 01/05/16 10:26 AM
Joined: Dec 2015
Posts: 116
D
Dazuz Offline
Vogon poet
Offline
Vogon poet
D
Joined: Dec 2015
Posts: 116
Another option:
Code:
on *:text:*hello*:#: {
  if (%flood) { return }
  set -u4 %flood On
  msg $chan $chr(160) hi $nick
}

160 is a non-breaking space, and it doesn't get stripped away, so effectively there's one special space and one normal space, which results in double space.

You don't necessarily have to use the $chr identifier, you could just put those non-breaking spaces there manually: //clipboard $chr(160) and paste away!

Re: A question about spaces in msg. [Re: Dazuz] #257645 01/05/16 05:34 PM
Joined: Mar 2016
Posts: 50
T
TUSK3N Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Mar 2016
Posts: 50
thank you very much, your solution seemed easier thanks smile