mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2011
Posts: 6
G
Gord10 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Feb 2011
Posts: 6
Sometimes I need to change the mode of my channel to 'invited' in order to prevent troll attacks. We get "Knock <UserName> invite only" notifies whenever someone tries to enter and I am going to write a script that can respond to this notifies.

However, I couldn't find any remote event about these types of messages (in other words, I don't know what they are classified as).

Thanks in advance!

Last edited by Gord10; 07/04/11 08:20 PM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
A quick test using my bot and a debug window indicates that the /knock command sends a Channel Notice, thus using the ON NOTICE event should work.

Joined: Feb 2011
Posts: 6
G
Gord10 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Feb 2011
Posts: 6
NOTICE didn't work for me, unfortunately. It can detect a /notice Gord10 Hello of another user perfectly, but nothing happens when my room is knocked on. Neither did snotice. I began to believe that it's something about the server.

And that server doesn't perceive the KNOCK command, as well.

Last edited by Gord10; 08/04/11 08:55 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You're using # and not ? for the notice event, right?

Code:
on *:notice:*knock*:#: { }


You can put the channel name as well, but you need either * for everything or # for channel. ? is for private notices.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2011
Posts: 6
G
Gord10 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Feb 2011
Posts: 6
Yes, I know that '?' is for private notices. I have made it

on *:notice:*:*:{
;;Codes those work with /notice Gord10 Hi.
}

just to make it sure it gets detected, but nothing happens.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

What network are you on?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:notice:*knock*:*:{
This works for me. The issue may have been that you use #. It's better to use *

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
His example shows that he used *. smile

@Gord10:

Type: /debug @debug

Then, have someone knock. Look in the debug window and it will help you determine what is happening with that knock.

That or let us know the network so someone here can connect there and try for you.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

There also could be a NOTICE event before it that is catching it?

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
it's probably a server notice (knocks aren't handled by ChanServ, are they?), take a look at /help on SNOTICE

i've also seen knocks sent in the same format as joins and parts, ie. ":nick!user@host KNOCK #chan :msg", in which case you may use this to detect them:

Code:
raw KNOCK:*:{ ; $1 is #chan, $2- is the message }


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Feb 2011
Posts: 6
G
Gord10 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Feb 2011
Posts: 6
jaytea's suggestion has really worked!

Yes, I have learned that a KNOCK server message is used, after opening a debug window. What I needed was learning how to use the raw event.

Thanks jaytea and everyone else. I wish I could tell the name of the adult server I have been residing.

Last edited by Gord10; 10/04/11 01:41 PM.

Link Copied to Clipboard