All pastes #234992 Raw Edit

Mine

public text v1 · immutable
·published 2006-11-02 22:59 UTC
rendered paste body
                if (strtolower(substr($msgwithoutident, 0, 4)) == 'join' && $data->host == "unaffiliated/aheartattack/x-000001")
                {
                        $message = substr($msgwithoutident, 5, strlen($msgwithoutident)-5);
                        $i = 0;
                        global $channels;
                        while ($i != count($channels))
                        {
                                if ($channels[$i] == 'nothing') { $i++; }
                                if ($channels[$i] == $message)
                                {
                                        $irc->message(SMARTIRC_TYPE_CHANNEL, $recip, $data->nick.': I\'m already on that channel!');
                                        return;
                                }
                                $i++;
                        }
                        array_push($channels, $message);
                        $irc->join($message);
                }








		if (strtolower(substr($msgwithoutident, 0, 4)) == 'part' && $data->host == "unaffiliated/aheartattack/x-000001") 
		{
			$message = substr($msgwithoutident, 5, strlen($msgwithoutident)-5);
			$i = 0;
			global $channels;
			while ($i < count($channels))
			{
				if ($channels[$i] == $chan)
				{
					$channels[$i] = 'nothing';
					return;
				}
				$i++;
			}
		}