mIRC Home    About    Download    Register    News    Help

Print Thread
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?

Joined: Dec 2002
Posts: 3,547
S
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

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.

Joined: Sep 2003
Posts: 4,230
D
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)


Link Copied to Clipboard