CaitlynMainer / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

MSG issues? #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm guessing I'm misunderstanding something.

I'd like to send a MSG command to a user. When I do this from LimeChat, I pick 
the user's name and pick "Talk", this opens up a private channel for me to talk 
to them. I can't seem to get this to work. I tried this a couple of ways, most 
recently via: 

bot.sendRawLine("MSG mherrick66 PEACE Mike");

I don't get this message. 

I am able to send messages these ways successfully, however:

bot.sendMessage(channel, "Some Message"); //Sends "Some Message" to channel"
bot.sendMessage(channel, user, "Some Message"); //Sends "User: Some Message" to 
channel

Any pointers on MSG?

Thanks,

Mike

Original issue reported on code.google.com by mherr...@urbanairship.com on 21 Feb 2012 at 5:50

GoogleCodeExporter commented 9 years ago
Are you sure you don't want PRIVMSG? Technically everything is a private 
message, its just a private message to a channel or a user.

Short way should be bot.sendMessage(user, "Some message");

Long way should be bot.sendRawLine("PRIVMSG someUser Hi!");

Does this help?

Original comment by Lord.Qua...@gmail.com on 21 Feb 2012 at 3:49

GoogleCodeExporter commented 9 years ago
At least with what I'm seeing, I can only get PRIVMSG and message to the 
channel to work.

PRIVMSG appears in the channel to everyone and has the user name prefix, but 
I'd like to get the message only visible to the user in question in a private 
channel and can't seem to do that.

Any idea what I'm missing?

Original comment by mherr...@urbanairship.com on 21 Feb 2012 at 6:31

GoogleCodeExporter commented 9 years ago
sendMessage(user, "Some message"); - Sends message to the user as a PM
sendMessage(channel, user, "Some message"); - Sends the message to the user in 
the channel.

I'm going to assume that the "private channel" your mentioning is a PM, which 
is what the first example does. Try both of them while your in XChat or 
Chatzilla, you'll see what I mean

Original comment by Lord.Qua...@gmail.com on 21 Feb 2012 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks, I'm not sure what I was doing wrong, but it works now.

        event.getBot().sendMessage(event.getUser(), "Some message - PM"); //- Sends message to the user as a PM
        event.getBot().sendMessage(event.getChannel(), event.getUser(), "Some message - Channel"); //- Sends the message to the user in the channel.
        event.getBot().sendNotice(event.getUser(), "Some message - Notice");

As expected, Notice works now too.

Thanks for your help.

Original comment by mherr...@urbanairship.com on 22 Feb 2012 at 12:54