Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: Ircbot plugin  (Read 4998 times)

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 989
    • GitHub
Ircbot plugin
« on: July 17, 2014, 12:52:52 AM »
Description

A BigBrotherBot plugin which introduces interaction between an IRC channel and your game server. The plugin implements both IRC and in-game commands and it react on both B3 and IRC events.

Requirements

In order for this plugin to work you need to have B3 v1.10dev installed (or greater). This plugin make use of some additions added to this B3 version since the 13th July 2014: to make sure you have the correct B3 version, download the last development snapshot from here. I will not introduce backward compatibility with B3 1.9.x version since it would require too many changes in the plugin code.

Installation

  • install python irc library by following instructions
  • copy the ircbot folder into b3/extplugins
  • copy the plugin_ircbot.xml file in b3/extplugins/conf
  • add to the plugins section of your b3.xml config file:

<plugin name="ircbot" config="@b3/extplugins/conf/plugin_ircbot.xml" />

IRC commands

Since there is the possibility of connecting multiple BOTs to the same IRC channel, every command launched from IRC must specify as first parameter the BOT name. Every IRC BOT will try to match such parameter with the BOT name itself to see if a command typed in the chat is directed to him or not: when this match fails the BOT will simply ignore the command.

  • !alias <botname> <client> - display all the aliases of a client
  • !b3 <botname> - display the B3 version
  • !ban <botname> <client> [<reason>] - ban a client
  • !cvar <botname> <name> [<value>] - set/get a cvar value
  • !help <botname> [<command>] - display the help text
  • !kick<botname> <client> [<reason>] - kick a client
  • !list <botname> - display the list of online clients
  • !livebans <client> - list all the active bans of a given client
  • !livechat <botname> [<on|off>] - enable/disable the livechat
  • !lookup <botname> <client> - retrieve information on a client
  • !permban <botname> <client> [<reason>] - permban a client
  • !plugins <botname> - display a list of plugins loaded
  • !reconnect <botname> - reconnect to the IRC network
  • !showbans <botname> [<on|off>] - enable/disable the ban notifications
  • !showkicks <botname> [<on|off>] - enable/disable the kick notifications
  • !showgame <botname> [<on|off>] - enable/disable new game notifications
  • !status <botname> - display server status information
  • !tempban <botname> <client> <duration> [<reason>] - tempban a client
  • !unban<botname> <client> [<reason>] - un-ban a client
  • !version <botname> - display the plugin version

B3 commands

  • !livechat [<on|off>] - enable/disable the livechat
  • !showbans [<on|off>] - enable/disable the ban notifications
  • !showkicks [<on|off>] - enable/disable the kick notifications
  • !showgame [<on|off>] - enable/disable new game notifications

B3 events

The plugin make use of the folowing events to display notices in the IRC channel:

  • EVT_CLIENT_BAN and EVT_CLIENT_BAN_TEMP : send a notice upon admin bans
  • EVT_CLIENT_KICK : send a notice upon admin kicks
  • EVT_GAME_MAP_CHANGE : send a notice when a new game start

Download

Last release: https://github.com/danielepantaleone/b3-plugin-ircbot/archive/master.zip
« Last Edit: November 30, 2014, 11:38:54 AM by Fenix »

Offline phyys1x

  • Full Member
  • ***
  • Posts: 96
  • Whatcha cudin
    • Clans website
Re: Ircbot plugin
« Reply #1 on: March 19, 2015, 01:18:34 AM »
Why can't my bot auth itself? I used this in middle of <perform> /auth username password, even tried msg [email protected] AUTH username password. Yes I did of course put it between <command>ACTIONHERE</command> 

Sooo.. Why isn't it working? It does perform the action I saw in the logfile see it for yourself. 

150318 20:09:56 DEBUG u'IrcbotPlugin: adding command to auto perform: msg [email protected] AUTH username password

Yes I replaced username and password with login so u dont know it, sorry :<

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 989
    • GitHub
Re: Ircbot plugin
« Reply #2 on: March 19, 2015, 01:19:53 AM »
The command is not /auth but simply auth. Remove the slash in front of it and it will work


Inviato dal mio iPhone utilizzando Tapatalk

Offline Mr.Yeah!

  • Newbie
  • *
  • Posts: 1
Re: Ircbot plugin
« Reply #3 on: March 20, 2015, 06:00:51 PM »
It turns out that just "auth <username> <password>" with 'auth' in lowercase didn't work for me either, for some reason it worked after i used it uppercase like this:


Code: [Select]
AUTH <username> <password>
« Last Edit: March 20, 2015, 06:05:04 PM by Mr.Yeah! »

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 989
    • GitHub
Re: Ircbot plugin
« Reply #4 on: March 20, 2015, 06:09:46 PM »
Ye well, it's not a problem of the plugin but more of the network you are connecting it to

Offline phyys1x

  • Full Member
  • ***
  • Posts: 96
  • Whatcha cudin
    • Clans website
Re: Ircbot plugin
« Reply #5 on: March 21, 2015, 06:01:34 PM »
Thanks! Worked :)

Offline phyys1x

  • Full Member
  • ***
  • Posts: 96
  • Whatcha cudin
    • Clans website
Re: Ircbot plugin
« Reply #6 on: May 16, 2015, 04:37:43 AM »
So I got a question, Why isn't it possible to warn players but kick & ban ? :)

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 989
    • GitHub
Re: Ircbot plugin
« Reply #7 on: May 16, 2015, 10:32:07 AM »
I never felt the need of warning from IRC. But it can be added


Inviato dal mio iPhone utilizzando Tapatalk

Offline phyys1x

  • Full Member
  • ***
  • Posts: 96
  • Whatcha cudin
    • Clans website
Re: Ircbot plugin
« Reply #8 on: July 10, 2015, 07:04:42 PM »
Oh okey, Well in MY and I guess for other it would be very useful :) whenever you get time to do it please do it :p

Offline Fenix

  • Dev. Team
  • Hero Member
  • *
  • Posts: 989
    • GitHub
Re: Ircbot plugin
« Reply #9 on: July 10, 2015, 07:33:58 PM »
The latest version implements the !exec command which allow you to execute all B3 commands, so for the warning you just have to !exec <botname> !warn <playername> <reason>
Is this enough?

Offline phyys1x

  • Full Member
  • ***
  • Posts: 96
  • Whatcha cudin
    • Clans website
Re: Ircbot plugin
« Reply #10 on: July 30, 2015, 04:12:29 PM »
that sounds great, nice.

 


Rate this page +1 at Google Search

anything