From 31306844f33ddc639931d9d7173f4af9f7fb327b Mon Sep 17 00:00:00 2001 From: pk910 Date: Fri, 9 Dec 2011 17:45:59 +0100 Subject: [PATCH] set UMode +r on AC (ACCOUNT) RAW --- Uplink/Uplink.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Uplink/Uplink.class.php b/Uplink/Uplink.class.php index 345ceb8..d90324b 100644 --- a/Uplink/Uplink.class.php +++ b/Uplink/Uplink.class.php @@ -253,6 +253,9 @@ class Uplink { case "OM": $this->recv_mode($from, $arguments); break; + case "AC": + $this->recv_account($from, $arguments); + break; //default default: //unknown cmd @@ -715,6 +718,18 @@ class Uplink { $this->eventHandler->event_usermode($targetUser, $modes); } } + + private function recv_account($from, $args) { + $user = P10_User::getUserByNum($args[0]); + if($user == null) { + trigger_error("Server tries to send an auth announce from an user that does not exist or was not found on recv_account.", E_USER_ERROR); + return; + } + $auth = $args[1]; + $user->getModes()->setModes("+r ".$auth); + if($this->eventHandler) + $this->eventHandler->event_usermode($user, "+r ".$auth); + } /******************************************************************************************** * SERVER FUNCTIONS * -- 2.20.1