mIRC Homepage
Posted By: Clubfoot on KNOCK - 03/08/03 08:34 PM
mIRC needs an on KNOCK event for channel knocks
Posted By: Watchdog Re: on KNOCK - 03/08/03 08:53 PM
Yep, a good idea, unless a numeric raw event already exists on which you could just use that.
Posted By: Clubfoot Re: on KNOCK - 03/08/03 08:57 PM
knocking triggers raw 0 which isnt documented anywhere
Posted By: Watchdog Re: on KNOCK - 03/08/03 09:17 PM
Ahhh yes, Raw 0 has a number of functions on my network, one which I remember is the ROLL function, which is like rolling a pair of dice. I think the other is for the SILENCE function if my memory serves me correctly.

Most IRCd's don't support the above so that is why you won't find much information on it.
Code:
raw *:*: {
  if ($numeric == 0) {
    if ($chr(33) !isin $1) {
      echo $colour(ctcp) -ta Roll of the dice: $2-
      haltdef
    }
    if ($chr(33) isin $1 && $chr(43) isin $1) {
      echo $colour(info2) -ta Silence added $1-
      haltdef
    }
    if ($chr(33) isin $1 && $chr(43) !isin $1) {
      echo $colour(info2) -ta Silence removed $1-
      haltdef
    }
  }
}
I structure my stuff like that. When KNOCK is finally supported on my network, and I know it will happen, I'll just add it there (if they include it on Raw 0 of course). If you want to see the structure of the raw event just open a debug window and get someone to send you a KNOCK.
Posted By: Clubfoot Re: on KNOCK - 03/08/03 09:20 PM
& event & prop & whisper
and knocks are structured exactly like the join event for example, which is why i propose adding it
Posted By: Watchdog Re: on KNOCK - 03/08/03 09:28 PM
They should make KNOCK like INVITE though I don't have WHISPER where I am, as we have the normal private chats and notices. We do have PROP and UPROP and that is supported by Raws 818 to 932.

I am just thinking though, that KNOCK, for example, might not be on Raw 0 on each server that supports it, which means that mIRC would have difficulty in converting that to ON KNOCK.
Posted By: codemastr Re: on KNOCK - 03/08/03 10:12 PM
Problem is, I think CR is the only IRCd that implements KNOCK like that. All other IRCds that I know of implement it as a notice.
On UnrealIRCd you get something like:
<- :devel.unrealircd.com NOTICE @#dddd :[Knock] by codemastr!me@myhost

On Hybrid:
<- :dddddd!me@myhost NOTICE codemastr :KNOCK: #dddd (dddddd[me@myhost] has asked for an invite)

So therefore, there is no need for an event. You can just handle it with an ON NOTICE. Btw, about raw 0, to my knowledge no IRCds other than CR use this numeric, most consider it an illegal value.
Posted By: LtGuide Re: on KNOCK - 04/08/03 07:27 AM
/help raw events

You can process non-numeric server messages by specifying the name of the event:

raw PROP:*mirc*:/echo 5 $1-


using /silence on ircu returns
<- :LtGuide!~lt01@aphore.com SILENCE +*!*@whatever.org
in the /debug

with the bit from the help file, you can create:
raw SILENCE:*:{
echo -a $iif(+* iswm $1,added,removed) $right($1-,-1) ...
halt
}
Posted By: Watchdog Re: on KNOCK - 04/08/03 11:11 AM
I like nesting things though, it's neater.
© mIRC Discussion Forums