From: NurPech Date: Sat, 21 Apr 2012 12:22:35 +0000 (+0200) Subject: Added method getAuthNick() to class P10_User X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=commitdiff_plain;h=f37602484b52f7c99bafdf506b83349adbc0763c Added method getAuthNick() to class P10_User --- diff --git a/Uplink/P10_User.class.php b/Uplink/P10_User.class.php index 4da7c43..651c6cc 100644 --- a/Uplink/P10_User.class.php +++ b/Uplink/P10_User.class.php @@ -161,6 +161,17 @@ class P10_User { public function isOnChannel($channel) { return array_key_exists(strtolower($channel->getName()),$this->channels); } + + public function getAuthNick() { + $authData = $this->getModes()->hasMode('r'); + $authnick = false; + if($authData) { + $authData = explode(':', $authData); + $authnick = $authData[0]; + } + + return $authnick; + } } ?> \ No newline at end of file