Skip to content

A PHP bot that is pretty badly written, but it provides you with the general concept of how to add commands, and allows you to get the bitcoin price, dogecoin price, and difficulty, and some other commands.

Notifications You must be signed in to change notification settings

matt-boyd/phpbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP IRC-BOT (WildPHP)

A IRC Bot built in PHP (using sockets) with OOP. Designed to run off a local LAMP, WAMP, or MAMP stack. Includes a custom Upstart script to run as Linux daemon.

Web

Features and Functions

Standard Commands

  • !say [#channel] [message] - Says message in the specified IRC channel.
  • !say [username] [message] - Says message in the specified IRC user.
  • !join [#channel] - Joins the specified channel.
  • !part [#channel] - Parts the specified channel.
  • !timeout [seconds] - Bot leaves for the specified number of seconds.
  • !restart - Quits and restarts the script.
  • !quit - Quits and stops the script.

Entended Commands

  • !ip - Returns IP of a user.
  • !poke [#channel] [username] - Pokes the specified IRC user.
  • !btc - Get the price of bitcoin.
  • !Doge - Get the price of dogecoin.
  • !Total [amount] - Get the price of [amount] dogecoins.
  • !joke - Tells you a random joke.
  • !DogeD - Tells you the difficulty of mining dogecoins.

Listeners

  • Joins - Greets users when they join the channel.

Install & Run

Dependecy

proctitle (optional) - Changes the process title when running as service.

pecl install proctitle-alpha

Config

Copy configuration file and customize its content.

cp config.php config.local.php

Copy Upstart script to folder and make appropriate changes.

sudo cp bin/phpbot404.conf /etc/init/

Run

Run as PHP

php phpbot404.php

or Upstart service

start phpbot404

Restart

restart phpbot404

Stop

stop phpbot404

Sample Usage and Output

<random-user> !say #wildphp hello there
<wildphp-bot> hello there
<random-user> !poke #wildphp random-user
* wildphp-bot pokes random-user

Community

IRC: #matthew_boyd@freenode.net

About

A PHP bot that is pretty badly written, but it provides you with the general concept of how to add commands, and allows you to get the bitcoin price, dogecoin price, and difficulty, and some other commands.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages