<?php
public function parse($package)
{
if(isset($package["type"]) && $package["type"] == "unavailable")
{
    if(((time() - self::$xmpp->users[(string)$package["from"]]["jointime"] < 30 && (isset(self::$xmpp->users[(string)$package["from"]]["messages"]) && self::$xmpp->users[(string)$package["from"]]["messages"] < 2) && (time() - self::$xmpp->startTime) > 50)) || (!isset(self::$xmpp->users[(string)$package["from"]]["messages"]) && time() - self::$xmpp->users[(string)$package["from"]]["jointime"] < 900 && (time() - self::$xmpp->startTime) > 900))
    {
	if(!array_search(strstr(self::$xmpp->users[(string)$package["from"]]["jid"], "/", true), explode("\n", file_get_contents("friends.txt"))))
	{
	    self::$xmpp->ban(strstr($package["from"], "/", true), self::$xmpp->users[(string)$package["from"]]["jid"]);
	    self::$xmpp->groupMessage(strstr($package["from"], "/", true), substr(strstr($package["from"], "/"), 1)." został zbanowany/a za przeciąg!");
	}   
    }
    else
	if(!array_search(strstr(self::$xmpp->users[(string)$package["from"]]["jid"], "/", true), explode("\n", file_get_contents("friends.txt"))))
	    file_put_contents("friends.txt", file_get_contents("friends.txt")."\n".strstr(self::$xmpp->users[(string)$package["from"]]["jid"], "/", true));
}    
}

In fact whole project is shitty as hell, if you want have some fun grab popcorn and read all the sources: XPBot on sourceforge

By Kadet, 2015-07-21 12:51:32