Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. class pingalert {
  3.     private $irc;
  4.     private $pingcount = 0;
  5.    
  6.     public function __construct($parent)
  7.     {
  8.         $this->irc = $parent;
  9.     }
  10.    
  11.     public function onPing()
  12.     {
  13.         $this->irc->say("#fayntic.test", "I got a ping");
  14.         $this->pingcount++;
  15.     }
  16.    
  17.     public function onpingcountCommand()
  18.     {
  19.         $this->irc->say("#fayntic.test", "I've had " . $this->pingcount . " pings so far");
  20.     }
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement