<commit_before><?php
/**
 *	OUTRAGEbot - PHP 5.3 based IRC bot
 *
 *	Author:		<NAME> <<EMAIL>>
 *
 *	Version:        2.0.0-Alpha
 *	Git commit:     <PASSWORD>
 *	Committed at:   Sat Feb  5 17:09:03 GMT 2011
 *
 *	Licence:	http://www.typefish.co.uk/licences/
 */


class CoreChannel
{
	/* Define our variables */
	private
		$pMaster = null,
		$sChannel = null;

	static
		$mTemp = null;

	public
		$pUsers = null,
		$pTopic = null;


	/**
	 *	Called when the class is constructed.
	 */
	public function __construct($pMaster, $sChannel)
	{
		$this->pMaster = $pMaster;
		$this->sChannel = strtolower(trim($sChannel));

		$this->pUsers = new stdClass();

		$this->pTopic = (object) array
		(
			"chantopic" => "",
			"timestamp" => "",
			"setter" => "",
		);
	}


	/**
	 *	Called when the object is converted to string.
	 */
	public function __toString()
	{
		return $this->sChannel;
	}


	/**
	 *	Properties: accessing psuedo properties.
	 *	@ignore
	 */
	public function __get($sKey)
	{
		$sKey = "propGet".$sKey;

		if(method_exists($this, $sKey))
		{
			return $this->$sKey();
		}

		return null;
	}


	/**
	 *	Properties: setting psuedo properties.
	 *	@ignore
	 */
	public function __set($sKey, $mValue)
	{
		$sKey = "propSet".$sKey;

		if(method_exists($this, $sKey))
		{
			return $this->$sKey($mValue);
		}

		return null;
	}


	/**
	 *	Users: Checks if a user is in the database
	 *	@ignore
	 */
	public function isUserInChannel($sNickname)
	{
		return isset($this->pUsers->$sNickname);
	}


	/**
	 *	Sends stuff to the channel. It's a shortcut, basically.
	 */
	public function __invoke($sMessage)
	{
		return $this->pMaster->Message($this->sChannel, $sMessage);
	}


	/**
	 *	Users: Add user to the internal database
	 *	@ignore
	 */
	public function addUserToChannel($sNickname, $sChannelMode = "")
	{
		$this->pUsers->$sNickname = $sChannelMode;
	}


	/**
	 *	Users: Rename a user from the internal database
	 *	@ignore
	 */
	public function renameUserInChannel($sOldNickname, $sNewNickname)
	{
		$this->pUsers->$sNewNickname = $this->pUsers->$sOldNickname; # Why do you error. WHY!?
		unset($this->pUsers->$sOldNickname);
	}


	/**
	 *	Users: Add user to the internal database
	 *	@ignore
	 */
	public function modifyUserInChannel($sNickname, $sMode, $sChannelMode = "")
	{
		if($sMode == '+')
		{
			$this->pUsers->$sNickname .= $sChannelMode;
		}
		else
		{
			$this->pUsers->$sNickname = str_replace($sChannelMode, "", $this->pUsers->$sNickname);
		}
	}


	/**
	 *	Users: Remove a user from the internal database
	 *	@ignore
	 */
	public function removeUserFromChannel($sNickname)
	{
		unset($this->pUsers->$sNickname);<commit_msg>Stopped the rename notice.<commit_after><?php
/**
 *	OUTRAGEbot - PHP 5.3 based IRC bot
 *
 *	Author:		<NAME> <<EMAIL>>
 *
 *	Version:        2.0.0-Alpha
 *	Git commit:     <PASSWORD>
 *	Committed at:   Sat Feb 12 18:06:30 GMT 2011
 *
 *	Licence:	http://www.typefish.co.uk/licences/
 */


class CoreChannel
{
	/* Define our variables */
	private
		$pMaster = null,
		$sChannel = null;

	static
		$mTemp = null;

	public
		$pUsers = null,
		$pTopic = null;


	/**
	 *	Called when the class is constructed.
	 */
	public function __construct($pMaster, $sChannel)
	{
		$this->pMaster = $pMaster;
		$this->sChannel = strtolower(trim($sChannel));

		$this->pUsers = new stdClass();

		$this->pTopic = (object) array
		(
			"chantopic" => "",
			"timestamp" => "",
			"setter" => "",
		);
	}


	/**
	 *	Called when the object is converted to string.
	 */
	public function __toString()
	{
		return $this->sChannel;
	}


	/**
	 *	Properties: accessing psuedo properties.
	 *	@ignore
	 */
	public function __get($sKey)
	{
		$sKey = "propGet".$sKey;

		if(method_exists($this, $sKey))
		{
			return $this->$sKey();
		}

		return null;
	}


	/**
	 *	Properties: setting psuedo properties.
	 *	@ignore
	 */
	public function __set($sKey, $mValue)
	{
		$sKey = "propSet".$sKey;

		if(method_exists($this, $sKey))
		{
			return $this->$sKey($mValue);
		}

		return null;
	}


	/**
	 *	Users: Checks if a user is in the database
	 *	@ignore
	 */
	public function isUserInChannel($sNickname)
	{
		return isset($this->pUsers->$sNickname);
	}


	/**
	 *	Sends stuff to the channel. It's a shortcut, basically.
	 */
	public function __invoke($sMessage)
	{
		return $this->pMaster->Message($this->sChannel, $sMessage);
	}


	/**
	 *	Users: Add user to the internal database
	 *	@ignore
	 */
	public function addUserToChannel($sNickname, $sChannelMode = "")
	{
		$this->pUsers->$sNickname = $sChannelMode;
	}


	/**
	 *	Users: Rename a user from the internal database
	 *	@ignore
	 */
	public function renameUserInChannel($sOldNickname, $sNewNickname)
	{
		if(!isset($this->pUsers->$sOldNickname))
		{
			return;
		}

		$this->pUsers->$sNewNickname = $this->pUsers->$sOldNickname;
		unset($this->pUsers->$sOldNickname);

		return;
	}


	/**
	 *	Users: Add user to the internal database
	 *	@ignore
	 */
	public function modifyUserInChannel($sNickname, $sMode, $sChannelMode = "")
	{
		if($sMode == '+')
		{
			$this->pUsers->$sNickname .= $sChannelMode;
		}
		else
		{
			$this->pUsers->$sNickname = str_replace($sChannelMode, "", $this->pUsers->$sNickname);
		}
	}


	/**
	 *	Users: Remove a user from the internal database
	 *	@ignore
	 */
	public function removeUserFromChannel($sNickname)
	{
		unset($this->pUsers->$sNickname);
{'fraction_non_alphanumeric': 0.16582633053221288, 'fraction_numerical': 0.0061624649859943975, 'mean_word_length': 3.1680933852140076, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7424765', 'n_tokens_mistral': 2249, 'n_tokens_neox': 1970, 'n_words': 420}