X-Git-Url: http://git.pk910.de/?p=PHP-P10.git;a=blobdiff_plain;f=Uplink%2FUplink.class.php;h=ba8b8ca14557f6a6caedabcc8951d76bc5b89100;hp=14585f6901fc5a7b11b253ad7a97b299c1143358;hb=5c6c3365d28144516f0ade183189b256d8de03bc;hpb=c695e03034950c4ccea2c6fcc1ee525116df96e0 diff --git a/Uplink/Uplink.class.php b/Uplink/Uplink.class.php index 14585f6..ba8b8ca 100644 --- a/Uplink/Uplink.class.php +++ b/Uplink/Uplink.class.php @@ -276,6 +276,9 @@ class Uplink { case "W": $this->recv_whois($from, $arguments); break; + case "A": + $this->recv_away($from, $arguments); + break; //default default: //unknown cmd @@ -356,6 +359,7 @@ class Uplink { private function recv_ping($from, $args) { $this->send("Z", $args[0]); //simply PONG + P10_Channel::recheckAllChannels(); } private function recv_nick($from, $args) { @@ -654,6 +658,19 @@ class Uplink { $this->send("318", $from, $args[1]); } + private function recv_away($from, $args) { + $user = P10_User::getUserByNum($from); + if($user == null) { + trigger_error("Server tries to send an away command from an user that does not exist or was not found on recv_away.", E_USER_ERROR); + return; + } + if(count($args) > 0) { + $user->setAway($args[0]); + } else { + $user->setAway(null); + } + } + /******************************************************************************************** * SERVER FUNCTIONS * ********************************************************************************************/