CodeWalrus

Development => Web => Topic started by: c4ooo on October 20, 2015, 02:19:46 AM

Title: c4Bot
Post by: c4ooo on October 20, 2015, 02:19:46 AM
Hey guys! As some of you have probably noticed on RIC, i have been developing an IRC bot in java. Although it is not yet versatile enough to be hosted, and is not in any of the channels unless i am working on it, it does have two useful commands:

@sp <text to correct>
Which uses google to correct most spelling error in the input, and
@trans <Text to translate> [-Output language] [-Input language]
Which will translate the text from input to output language. It uses yandex as a translator, and the negative sign is required when specifying the language. The full name or the two letter iso abbreviation could be used. If no Input language is specified then it automatically detects the language, and if no output language is specified it translates to english. Note, it is impossible to specify an input but no output language.

As of right now, the bot works in omninet, although not in walrii net. :P
Title: Re: c4Bot
Post by: novenary on October 21, 2015, 07:54:40 AM
Sounds fun. You can bring the bot in #cw-spam on Efnet (note that it's not really an official channel) to show it off/test it. :)
Title: Re: c4Bot
Post by: Dream of Omnimaga on October 22, 2015, 01:21:02 AM
Those features seems interesting. First doesn't have much risk of flooding, but you might want to make sure that the bot won't get kicked for flood if overused (eg add a filter that makes it reply less than a certain amount of time per minute so the CW botnet won't autokick). I'm not too sure if we should have it in the main channel but I guess it depends of other staff as well.
Title: Re: c4Bot
Post by: novenary on October 22, 2015, 04:08:51 PM
If we allow the bot into the channel it can possibly be whitelisted from flood protection.
Title: Re: c4Bot
Post by: c4ooo on November 12, 2015, 09:25:27 PM
 :)

BTW, the bot worked fine when connected to #spam on Omninet and issued commands from efnet, OIRC, and Omninet. I dont know why it did not worked when connected to #codewalrus  <_<
Title: Re: c4Bot
Post by: alexgt on November 12, 2015, 09:29:03 PM
Those commands would be nice :) Good luck
Title: Re: c4Bot
Post by: Dream of Omnimaga on November 14, 2015, 10:01:21 AM
Quote from: c4ooo on November 12, 2015, 09:25:27 PM
:)

BTW, the bot worked fine when connected to #spam on Omninet and issued commands from efnet, OIRC, and Omninet. I dont know why it did not worked when connected to #codewalrus  <_<
Not sure, but don't put it in #codewalrus without staff permission, since it's against the rules. (unless you already got permission? In which case it's most likely EFnet being dumb)
Title: Re: c4Bot
Post by: novenary on November 14, 2015, 10:07:17 AM
Permission or not, the bot should be able to join the channel. It's odd that you can't connect it to efnet, maybe try a different server ? A lot of efnet servers do not allow bots.
Title: Re: c4Bot
Post by: c4ooo on November 14, 2015, 07:04:31 PM
Sorry for being confusing. That one time i connected the bot to #codewalrus i did it via Omninet. It did not work, while it works perfectly on other Omninet channels like #omnimaga itslef.  :P
Title: Re: c4Bot
Post by: Dream of Omnimaga on November 15, 2015, 06:18:33 AM
Could it match one of our bans? Although I think only one user is banned, IIRC there are multiple hostmasks in the ban list.

You should implement error logging in your bot and tell what error you get when joining #codewalrus.
Title: Re: c4Bot
Post by: novenary on November 15, 2015, 09:34:05 AM
I dunno what the ban list is on omninet, we don't even have ops there anymore. :P
Title: Re: c4Bot
Post by: Dream of Omnimaga on November 19, 2015, 04:43:37 PM
It's possible that one or more Omni ops setup bans by accident during the Ephraim ban evasion (and maybe that ERRSYNTAX guy as well?). They also had issues with Wowaname IIRC. Typically, though, they g-line people, not ban them. This is why for example if Ephraim tried joining #codewalrus on Omninet he wouldn't be able to, because of the Omnimaga ban. He would need to use EFnet.

I am not sure why c4ooo bot in particular would be able to join #omnimaga when #codewalrus doesn't work, though. The only possibility is that it matches Pimath hostname, because that's the only ban we have there.
Title: Re: c4Bot
Post by: novenary on November 19, 2015, 06:15:01 PM
As I said, it's unlikely and pimath is not banned on the omninet channel (that we should drop at some point).
Title: Re: c4Bot
Post by: Dream of Omnimaga on November 19, 2015, 06:16:22 PM
Ah I thought he was banned since we didn't lose Omninet channel control until a month later. And yeah I agree. The only reason why we kept the Omninet channel is because Juju was unable to connect the Telegram bot to EFnet, IIRC.


Do you know why c4bot would not connect to 1 specific channel, though?
Title: Re: c4Bot
Post by: novenary on November 19, 2015, 06:19:23 PM
Nope, no idea other than his bot itself being bugged. :P
Title: Re: c4Bot
Post by: c4ooo on November 20, 2015, 01:59:54 AM
Quote from: Streetwalrus on November 19, 2015, 06:15:01 PM
As I said, it's unlikely and pimath is not banned on the omninet channel (that we should drop at some point).
Double negatives are confusing :P
/me runs

I think it may have been a one-time thing where it failed once, but idk, maybe when the chan is quit sometime streetwal can let me in to see exactly what goes wrong in #codewalrus :3 ?
Title: Re: c4Bot
Post by: Dream of Omnimaga on December 03, 2015, 07:00:18 PM
I'm late, but I think the best way is that you should implement error logging in your bot so that it can catch any message such as "nick/chan is temporary unavailable" when the bot attempts to join channels, as well as the server MOTD, connect info and any other error that could happen there"