mIRC Home    About    Download    Register    News    Help

Print Thread
removing - character that's occurring in messages #123852 28/06/05 02:59 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
A friend of mine has a problem with her computer. Due to a game her son plays, when she types in mIRC she occasionally gets a - at the front of a word (eg: -word rather than word). I thought using
Code:
on *:input:*:{ .msg $target $remove($1-,$chr(45)) | halt }   
would work, but when tested, it prevented the messages from going at all, and without the | halt, it was sending both the message with the - removed and the same message with the - included.

Any ideas?

Re: removing - character that's occurring in messages #123853 28/06/05 03:50 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean the messages didn't send because it was prefixed with a --> . <-- and wasn't being echoed?

Code:
on *:Input:*: {
  if (!$istok(/ $readini($mircini, text, commandchar), $left($1, 1), 32)) &amp;&amp; (!$ctrlenter) &amp;&amp; (!$inpaste) {
    .msg $chan $remove($1-,$chr(45))
    echo -t $target $+(&lt;,$me,&gt;) $remove($1-,$chr(45))
  }
  halt
}


-Andy

Re: removing - character that's occurring in messages #123854 28/06/05 05:12 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'm not sure, but I'll pass the suggestion on to the person that's actually having the trouble.

Re: removing - character that's occurring in messages #123855 28/06/05 05:49 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
.msg $chan $remove($1-,$chr(45))
echo -t $target $+(<,$me,>) $remove($1-,$chr(45))


or even just
msg $chan $remove($1-,$chr(45))


i guess if its only at the begining of a word, it could be

msg $chan $mid($replacex(. $1-,$chr(32) $+ -,$chr(32)),3)