Version 2.0 - Sending to a particular channel?

126 views
Skip to first unread message

Pascal Charbonneau

unread,
May 13, 2013, 11:18:04 AM5/13/13
to pirc...@googlegroups.com

I am currently writing an IRC Bot plugin for the JIRA issues tracking system. I was using version 1.9 but the version 2.0 seems to have a better design. I know it is still in "dev" status but was wondering if I should give it a go for a production release of the plugin? I dont mind helping out and finding/reporting issues as I go but would like to have an idea of the stability. Is 2.0 close to an official release? 

Also we used to be able to easily send messages to a specific channel with sendMessage() and even though you show the new way to send message in response to an event:

event
.getChannel().send().message(event.getUser(), "That is incorrect");

Can we still send a message to a channel by passing the channel name as a string without having the Channel object from event ?

Used to be like this:

bot.sendMessage("#channelXYZ", "This is a message");

Can we still send a message to a channel by passing the channel name as a string without having the Channel object from event ?

Thanks in advance

Leon Blakey

unread,
May 13, 2013, 5:04:20 PM5/13/13
to pirc...@googlegroups.com
I'm not sure how your storing Channels, but I'd recommend storing the Channel objects themselves instead of just the names.

You can send a message to any target with bot.sendIRC().message("#channelXYZ","This is a message");



--
You received this message because you are subscribed to the Google Groups "pircbotx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pircbotx+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pascal Charbonneau

unread,
May 13, 2013, 10:26:32 PM5/13/13
to pirc...@googlegroups.com
Thanks for answering so fast, Channels are actually store under an unknown database backend via an ActveObjects pattern so I cannot store the objects themselves unless I do a lot of OSGi magic to declare the beans, etc. They have a pretty complex (to me) setting. I will use the bot.sendIRC().message("#channelXYZ","This is a message") as suggested then.

I could stop by to show you the bot in your test channel once its released on the Atlassian Marketplace if you want.  Its got a few nice extra features like a REST API and webhooks for Git, etc.
Reply all
Reply to author
Forward
0 new messages