zD12 / pircbotx

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

event.respond is broken (at least for me) #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.See the attached source code (Include it in a bot to reproduce it)
2.Run the bot
3.say $8Ball in a channel with the bot in

What is the expected output? What do you see instead?
I expect to see a message picked at random from an array of messages.
I see no repsonse from the bot instead.

What version of the product are you using? On what operating system?
pircbotx 1.6 Win7 Netbeans IDE 7.0.1

Please provide any additional information below.

Original issue reported on code.google.com by netgooguy@googlemail.com on 19 May 2012 at 8:43

Attachments:

GoogleCodeExporter commented 9 years ago
Oops, forgot the messages file;
here it is

Original comment by netgooguy@googlemail.com on 20 May 2012 at 10:37

Attachments:

GoogleCodeExporter commented 9 years ago
Seems to be working fine for me:
<TheLQ> $8Ball
<PircBotX> TheLQ: Reply hazy, try again
<TheLQ> $8Ball
<PircBotX> TheLQ: As I see it, yes

Are there any exceptions? I did run into an ArrayOutOfBoundsException because 
there were too many lines, but that might just be because there was a stray 
newline. Check your output to see if there are any

2 things though:
1) You could write it better so its easier to use: Don't use an Array, use an 
ArrayList. Close your BufferReader when you finish loading the messages, its 
not necessary to keep it open. You could also use 
event.getMessage().toLowerCase().contains("$8ball") in 1 if statement instead 
of dividing it between two

2) This issue tracker isn't really for "Help, my bot isn't working" issues, its 
mainly for "Something is wrong with PircBotX". Event.respond() works because 
the example bot in the project that uses it works. I really don't mind 
answering questions and helping people fix bots, but it needs to be done on the 
mailing list, not on the issue tracker

Original comment by Lord.Qua...@gmail.com on 20 May 2012 at 11:52

GoogleCodeExporter commented 9 years ago
...Theres a mailing list?
I coudnt find it.

Original comment by netgooguy@googlemail.com on 23 May 2012 at 7:19

GoogleCodeExporter commented 9 years ago
The link is on the home page, but its not that prominently displayed. I'll work 
on getting it displayed better

http://groups.google.com/group/pircbotx?pli=1

Original comment by Lord.Qua...@gmail.com on 23 May 2012 at 11:45