function DestroySocket($reason = false) { if (self::$_ConnectionInfo[0]['socket'] == false || self::$_ConnectionInfo[0]['socket'] == null) { echo ">> Could not terminate connection. It doesnt exist!"; } else { if (!isset($reason)) { IRCHandle::SendData('QUIT :FML Open Source Bot v1.0'); } else { IRCHandle::SendData('QUIT :' . $reason); } } }