It's our post notifier bot I just wrote, along with a few features I should probably write (based on Eeems' EeeZorBot framework).
Features- Notifies of posts made on CodeWalrus
- Provides services to the IRC channels
How it worksThe forum software simply sends an UDP packet to the bot which posts it on IRC. Probably the simplest and the fastest way so it won't lag at all. I chose UDP because it's a connectionless protocol, unlike TCP.
RestartShould you have the need restart it (which I doubt), it's pretty much the same way as OmnomIRC (it could probably be converted as a systemd service if you want). Look for something like "js lib/main.js" or "npm start", kill it, cd to where the bot is (currently in my homedir) and type "npm start" in a screen.
CodeIf you guys want to write a mod, I'll post the current diff here:
--- Subs-Post.php~ 2014-12-17 21:38:52.494808188 +0000
+++ Subs-Post.php 2014-12-19 01:14:23.910808189 +0000
@@ -2032,6 +2032,15 @@
if ($msgOptions['approved'])
updateLastMessages($topicOptions['board'], $new_topic || !empty($topicOptions['is_approved']) ? $msgOptions['id'] : 0);
+ // Send this to IRC
+ if(!in_array($topicOptions['board'], array(2, 12)))
+ {
+ $ircsocket = stream_socket_client('udp://127.0.0.1:33333');
+ $sendstr = "PRIVMSG #CodeWalrus :\x0310New ".($new_topic?"topic":"post")." by \x0304".html_entity_decode($posterOptions['name'])."\x0310 on \x0303".html_entity_decode($msgOptions['subject'])."\x0310 http://codewalr.us/".$topicOptions['id']."/".$msgOptions['id'];
+ stream_socket_sendto($ircsocket, $sendstr);
+ fclose($ircsocket);
+ }
+
// Alright, done now... we can abort now, I guess... at least this much is done.
ignore_user_abort($previous_ignore_user_abort);
The diff is for both /Sources/Subs-Post.php and /mobiquo/include/Subs-Post.php (because Tapatalk copied the file in its own directory or I dunno).
For the bot plugins I added, it's here:
https://github.com/juju2143/EeeZorBot-scriptsCurrent bugs- Doesn't hide the staff board- Tapatalk fixed!
- No customization other than modifying the code directly
- No topic length limit (it probably shouldn't be annoying but we can always add it if it's a problem, just tell me)
- Some commands are still experimental and can crash the bot
Have fun.