Skip to main content
Easton's stuff

Main navigation

  • Code
  • SnackLinux
  • Home

Breadcrumb

  1. Home

christmas sucks

By Easton , 7 May, 2010

PHP IRC bot

Been bored lately, so I'd thought I'd make an IRC bot in PHP. I wasn't sure how they worked, so I found this to be great: http://www.hawkee.com/snippet/5330/

I added a little more to it, using switch() instead of an if statement. So, instead of:


if ($rawcmd[1] == "!sayit") {

I changed it to

 

 switch(rtrim($rawcmd[1])) {

 

and of course everything else in between. 
See the full code here: http://pastebin.com/4F9XPkVx or here http://pastebin.org/205819
Not much has changed, but with switch() I found it easier to add more commands. Again, I didn't write most of it. Feel free to test it out though.

Tags
flying monkeys
php
gehoorbeschermers
script
christmas sucks
irc
By Easton , 24 December, 2008

Kapli Doschdja

Ymas is tomorrow. Haven't slept in 24 hours (except for a short 1.5hr nap). I cant till Ymas is over, I never really liked Ymas in the first place (except for presents :D). Anyway, I've been sorta (half ass) trying to get my other server (jlap) running (so it would share the load) with my other server (flippy).
Its almost 9am here, I think its couch time.
P.S. If I get anything interesting I'll post back here tomorrow....

Tags
flying monkeys
wtf
ymas
music
christmas sucks
christmas sucks

Navigation

  • GitHub Profile
  • SnackLinux
  • Popular pages
    • Restoring a Macintosh Plus
    • Getting root access on a $10 Aliexpress Wifi repeater
    • Remote code execution on no-name wifi repeaters: Part 2
    • Building your own handheld GPS with an ESP32
    • Remote code execution with Hitron CGNM-2250
    • NES controller and a RaspberryPi
    • 4000 series CMOS 24 hour clock
  • Toyota Overland
RSS feed



 

Powered by Drupal