mIRC Home    About    Download    Register    News    Help

Print Thread
#203011 04/08/08 11:11 PM
Joined: Jan 2007
Posts: 20
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jan 2007
Posts: 20
I have a small script that uses an on INPUT event to run another command inside a query window for the ChatOps/NaChat options of Unreal on a network I oper on. The script used to work in one of the previous versions of mIRC (I don't recall which). It would use haltdef after sending the chatops or nachat command, and wouldn't process sending a privmsg to the non-existent nick. In 6.33, it ignores the haltdef and still tries to send the privmsg. The mIRC help file says to use halt, so I tried that, with the same results. Here is the script in it's entirety:

Code:
on ^*:SNOTICE:*:{
  if (chatops isin $2 || netadminchat isin $2) {
    query $iif(chatops isin $2, ChatOps, NaChat)
    echo -tmi2 $iif(chatops isin $2, ChatOps, NaChat) 02 $+ $2 $3 < $+ $remove($5, :) $+ >04 $6-
    haltdef
  }
}
on *:INPUT:*:{
  if ($target != ChatOps && $target != NaChat) return
  var %cmd = $iif($target == ChatOps, co, na)
  if ($mid($1, 1, 1) != $chr(47) || $ctrlenter) {
    %cmd $1-
    halt
  }
  else {
    if ((/say isin $1) && !$ctrlenter) {
      %cmd $2-
      halt
    }
    if ((/me isin $1) && !$ctrlenter) {
      %cmd * $2- *
      halt
    }
  }
}
alias co chatops $iif($left($1, 1) == :, :) $+ $$1-
alias na nachat $iif($left($1, 1) == :, :) $+ $$1-


Those halts used to be haltdef before. When I type anything into a query window for NaChat or ChatOps, it sends the correct chatops or nachat command, but also sends the privmsg, which I don't want. I don't currently have a way of testing previous versions of mIRC to see when it stopped working right.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
do you have any other input scripts in other files?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jan 2007
Posts: 20
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jan 2007
Posts: 20
I didn't even think about that. Yes, I do. It's also set to * for target. I suppose I should've checked that first instead of thinking it was a bug in mIRC. Sorry for the noise.


Link Copied to Clipboard