All pastes #620407 Raw Edit

Stuff

public text v1 · immutable
·published 2007-07-15 13:49 UTC
rendered paste body
<?php
/**
 *  Copyright 2007 Afonso Garcia. (http://openmac.webtuga.net)
 *  
 *  This module is based in module "quotes", written by kingless
 *  and it is designed to use as a system for displaying an IRC
 *  bash.
 *
 *  This will be updated when module "quotes" is updated.
 *
 *  @license http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 *  @module Bash 0.1 Alpha
 * 
 *  @author Afonso Garcia (agfrg) - <agfrg@webtuga.com>
 *
 *  @module "quotes" by Luis Filipe (kingless) - <blastelf@gmail.com>
 */
$module->registerModule( 'bash', 'show' );

class bash {

	function show() {
		global $iBot;
		static $quotes;

		if($iBot->args[0] != '!bash') {
			return;
		}

		if(!isset( $quotes )) {
			$quotes = file( dirname(__FILE__).'/bash.txt' );
		}

		srand((float) microtime() * 10000000);
		$rand = array_rand($quotes, 1);

		$quote = $quotes[$rand];

		$iBot->msgChan( $iBot->text( $rand, '', 'bold' )." - ". $quote );
	}
}
?>