From f37602484b52f7c99bafdf506b83349adbc0763c Mon Sep 17 00:00:00 2001 From: NurPech Date: Sat, 21 Apr 2012 14:22:35 +0200 Subject: [PATCH] Added method getAuthNick() to class P10_User --- Uplink/P10_User.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.20.1