mIRC Home    About    Download    Register    News    Help

Print Thread
on KNOCK #39496 03/08/03 08:34 PM
Joined: Aug 2003
Posts: 17
C
Clubfoot Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Aug 2003
Posts: 17
mIRC needs an on KNOCK event for channel knocks

Re: on KNOCK #39497 03/08/03 08:53 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Yep, a good idea, unless a numeric raw event already exists on which you could just use that.

Re: on KNOCK #39498 03/08/03 08:57 PM
Joined: Aug 2003
Posts: 17
C
Clubfoot Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Aug 2003
Posts: 17
knocking triggers raw 0 which isnt documented anywhere

Re: on KNOCK #39499 03/08/03 09:17 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Re: on KNOCK #39500 03/08/03 09:20 PM
Joined: Aug 2003
Posts: 17
C
Clubfoot Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Aug 2003
Posts: 17
& event & prop & whisper
and knocks are structured exactly like the join event for example, which is why i propose adding it

Last edited by Clubfoot; 03/08/03 09:21 PM.
Re: on KNOCK #39501 03/08/03 09:28 PM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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.

Re: on KNOCK #39502 03/08/03 10:12 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Re: on KNOCK #39503 04/08/03 07:27 AM
Joined: Dec 2002
Posts: 46
L
LtGuide Offline
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 46
/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
}


evil is in the eye of the beholder
Re: on KNOCK #39504 04/08/03 11:11 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I like nesting things though, it's neater.