소스 검색

darkirc: send server reply of rehash command

dasman 1 년 전
부모
커밋
4ffb1f77ec
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      bin/darkirc/src/irc/command.rs
  2. 6 0
      bin/darkirc/src/irc/rpl.rs

+ 1 - 1
bin/darkirc/src/irc/command.rs

@@ -731,7 +731,7 @@ impl Client {
             error!("Failed to rehash server: {}", e);
         }
 
-        Ok(vec![])
+        Ok(vec![ReplyType::Server((RPL_REHASHING, format!("Config reloaded!")))])
     }
 
     /// `TOPIC <channel> [<topic>]`

+ 6 - 0
bin/darkirc/src/irc/rpl.rs

@@ -147,6 +147,12 @@ pub const RPL_MOTD: u16 = 372;
 /// Indicates the end of the Message of the Day to the client.
 pub const RPL_ENDOFMOTD: u16 = 376;
 
+/// `<client> <config file> :Rehashing`
+///
+/// Sent to an operator which has just successfully issued a REHASH
+/// command.
+pub const RPL_REHASHING: u16 = 382;
+
 /// `<client> <nickname> :No such nick/channel`
 ///
 /// Indicates that no client can be found for the supplied nickname.