Skip to content
This repository has been archived by the owner. It is now read-only.
[Discontinued] PHP-framework for creating simple IRC bots.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status


Krinkle IRC Bot


Kribo is a small PHP-framework for creating simple IRC bots. By default it has little function but its power is in the extensibility through plugins.

Be it custom functionality of the bot (executing commands to a server), or simple commands like "!date", or to log a transcript of the channels, you can do it with Kribo.


  • PHP: 5.3.2+
  • Shell access to your server
  • Server permission: PHP may not be in safe mode and socket connections must be allowed from your account and from PHP.


  1. Configure Kribo in LocalConfig.php
  2. Start the bot with:
    php Init.php


One can have per-instance local and shared configuration (e.g. nickname, target channel(s), activated plugins and more).

The configuration is stored in the global $KriboConfig object and is populated through ./includes/DefaultConfig.php. Settings can be overriden or extended through ./LocalConfig.php and by plugins installed through ./LocalConfig.php.


  • serverHost: Hostname of the IRC server to connect to (e.g. "localhost" or "")
  • serverPort: Port to connect to on serverHost. The default (6667) should be fine in most cases
  • socketHostname: The IP-address to bind the socket to. Not currently used.
  • autoJoinChannels: Channels joined on start-up.


  • userChatName: Default username that the bot will use to identify itself when connecting to serverHost.
  • userAltNamePattern: What to use if the nickname is already taken or may not be used. You can use $1 as dynamic substitute for userChatName. So if userChatName = "MyBot"; and userAltNamePattern = "$1_";, then it will use "MyBot_" if "MyBot" is taken.
  • userRealName: The value to use as "real name" in the IRC user information. $1 will be replaced with value of version.


If all of the next four are not null, then the bot will PRIVMSG userAuthService directly after the connection is established (before channels are joined), with the userAuthPattern. The default settings are optimized for the "NickServ" service as found on many servers (such as Freenode). If you're using that, then only userAuthID and userAuthPassword have to be set in ./LocalConfig.php.

  • userAuthService: Nickname of the authservice available on serverHost
  • userAuthPattern: Pattern of the message that is to be send to userAuthServer to identify. $1 will be replaced with userAuthID, and $2 with userAuthPassword.
  • userAuthID: Auth username
  • userAuthPassword: Auth password. Be careful when publishing your LocalConfig that this isn't exposed!

Command info

  • commandPrefixDefault: The default listener for commands. Individual commands may override this.
  • $1: userChatName
  • $2: userAuthID
  • $3: current nickname.
  • Example values:
    "!" (!foo)
    "$1: " (KriboNick: foo)
    "$2: " (Kribo: foo)
    "$3 " (KriboNick__ foo)

Command registry

  • commandRegistry: This keeps track of all commands. Keys are the command names. Values are arrays with options. Check HOOKS for more info.


  • hookRegistry: Registry for hooks. For example:
$KriboConfig->hookRegistry['hookname'][] = 'myclass::func';

$KriboMain->unregisterHookFunc( 'myclass::func', 'hookname' );

$KriboConfig->hookRegistry['onReceive'][] = 'KriboCoreHooks::onReceive';


Check out


  1. Where can I download Kribo?
    Get started right away with a git clone:
    git clone
    Or download the latest master as a ZIP from:

  2. How do I install Kribo?
    Check Installation.

  3. Where can I get plugins?
    I mainain a small stock at

  4. Where should I report X or request Y?
    If you encounter any problem, have feedback, suggestions, patches, feature requests etc. please enter in the Issue tracker:

  5. Under what license is Kribo available?
    Creative Commons Attribution 3.0 Unported

You can’t perform that action at this time.