All pastes #92829 Raw Edit

Untitled

public text v1 · immutable
#92829 ·published 2006-07-19 23:29 UTC
rendered paste body
    function tell($name, $msg)
    {
	  $result = $this->bot->db->select("SELECT name FROM blacklist where name='" . $name . "'");
	  $mem_check = $this -> bot -> db -> select("SELECT nickname FROM members WHERE id = " . $this -> bot -> aoc -> get_uid($name));

      if (preg_match("/^" . $this -> bot -> commpre . "join/i", $msg))
	    if (!empty($result))
		{	
			$this -> bot -> send_tell($name, "You cannot join when blacklisted.");
		} else if (empty($mem_check))
		{
			$this -> member_register($name);
		} else
		{
			$this -> bot -> db -> query("INSERT IGNORE INTO raid_points (id, points, raiding) VALUES (" . $this -> bot -> aoc -> get_uid($name) . ", 0, 0)");	
			$this -> bot -> aoc -> privategroup_invite($name);
      	}
	  //else if (preg_match("/^" . $this -> bot -> commpre . "chat/i", $msg))
        //$this -> bot -> aoc -> privategroup_invite($name);
	  //else if (preg_match("/^" . $this -> bot -> commpre . "invite$/i", $msg))
		//$this -> bot -> aoc -> privategroup_invite($name);
      else if (preg_match("/^" . $this -> bot -> commpre . "leave/i", $msg))
        $this -> bot -> aoc -> privategroup_kick($name);
      else if (preg_match("/^" . $this -> bot -> commpre . "invite (.+)$/i", $msg, $info))
        $this -> invite($name, "tell", $info[1]);
      else
        $this -> bot -> send_help($name);
    }