Question

How would I go about making a trigger (E.g. !Help) and then the bot will private message them a list. Not the type of message where it will open a new window, but where it will show in the channel but only them can see it (if you know what I mean.) I don't know the terms with these, so any help would be great.

Was it helpful?

Solution

The message you're talking about is one sent by using the /msg <User> message command as opposed to one using /query. As explained here (section 2.2 Private conversations):

In mIRC, if you initiate a /MSG you don’t get a “query” window until the other person responds to you. You can set up a “query” window on your side right from the beginning by using the /QUERY command.

The thing is, as this is client specific behavior you can never be sure a client that isn't mIRC will behave one way or another.

With that out of the way, coding-wise, what you most likely will want to use is a python irc protocol client library that will save you the trouble of dealing with the IRC protocol plumbing. That particular library brings you an example irc bot, which is probably the point where you'd need to start.

Good luck.

OTHER TIPS

It looks to me like what you want is a NOTICE event, not a PRIVMSG?

PRIVMSG is an event that specifies text sent to a recipient, where the recipient can be either a person or a channel. You asked for a private message that does not open a new window, and a PRIVMSG sent directly to a user will open a new window for them. A PRIVMSG sent to a channel will display in the channel.

NOTICE sends a user a direct message that does not create a new window. However, I discourage the use of it, since many clients handle this type of event differently.

For example;
mIRC will, by default, display a NOTICE in the currently active window.
Irssi however will display them in the status window, likely to be disregarded.

All this being said, I'm not quite sure what you are using Python for, is wasn't explained in your post. I can only assume the bot is programmed in Python and you are using a mIRC client?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top