mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
I made a script that intercepts msg and then does halt, like

on ^1:TEXT:*:?:{
........
........
}

but I just noticed that it is triggered for both normal msgs and omsgs. Can I make it distinguish the two? (be that an if-clause or a different script, I don't mind)


My ally is the compiler, and a powerful ally it is!
Joined: May 2004
Posts: 95
W
Babel fish
Offline
Babel fish
W
Joined: May 2004
Posts: 95
that is not possible, omsg simply uses "PRIVMSG op1,op2,op3 :message" and the targets just receive a normal PRIVMSG, there is no difference.

i assume you mean the default /omsg command in mirc, on undernet/quakenet using msg @#channel does not work either.

Last edited by wiebe; 11/07/04 04:47 PM.
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
ok i looked more deeply into omsgs and figured out the difference:

a normal msg to a channel:

privmsg #chan :text

an omsg to a channel:

privmsg @#chan :text

I tried checking if the leftmost character of $chan is @, but mIRC by default removes the optional leading @, so prolly I'll have to work with the $rawmsg :\


My ally is the compiler, and a powerful ally it is!
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Just use $target.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2004
Posts: 79
C
cmad Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2004
Posts: 79
whoa I solved it with a dumb way before you posted. The $target solution is just what I need. Thanks!

BTW: Here's how I solved it:
Code:
  set %channame $mid($rawmsg, $calc($pos($rawmsg, $chr(32), 2)+1), $calc($len($chan) + 1))
  if ($left(%channame, 1) == @) {


My ally is the compiler, and a powerful ally it is!

Link Copied to Clipboard