added RRD Stats Module
[PHP-P10.git] / Uplink / Uplink.class.php
index 14585f6901fc5a7b11b253ad7a97b299c1143358..ba8b8ca14557f6a6caedabcc8951d76bc5b89100 100644 (file)
@@ -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                                     *
         ********************************************************************************************/