Code Monkey home page Code Monkey logo

ircbot's Introduction

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.
  • !weather [location] - Returns weather data for location.
  • !poke [#channel] [username] - Pokes the specified IRC user.
  • !joke - Returns random joke. Fetched from ICNDb.com.
  • !imdb [movie title] - Searches for movie and returns it's information.

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: #[email protected]

ircbot's People

Contributors

googlesky avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

ngthuc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.