WaitForQueue and WhoisEvent

22 views
Skip to first unread message

PENAIT1

unread,
May 19, 2015, 6:44:25 PM5/19/15
to pirc...@googlegroups.com
Hello,

With my bot I want to send a whois request to get the getRegisteredAs name. I have the following piece of code.

    WaitForQueue queue = new WaitForQueue(event.getBot());
    bot.sendIRC().message("nickserv", "info " + event.getUser().getNick());
    WhoisEvent currentEvent = queue.waitFor(WhoisEvent.class);
    queue.close();




But sending the whois request before the queue.waitFor doesn't work because it wont detect it because it already happend, and sending it after doesnt work either because it keeps waiting till there has been a whois.
Is there any way to solve this?

PENAIT1

unread,
May 31, 2015, 5:35:04 PM5/31/15
to pirc...@googlegroups.com
Does nobody know this? How to set a waitforqueue for an event your are calling youself with the bot like an whois event?

Op woensdag 20 mei 2015 00:44:25 UTC+2 schreef PENAIT1:
Reply all
Reply to author
Forward
0 new messages