-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement server-local VERSION response (#98)
- Loading branch information
1 parent
901b26b
commit d369bf4
Showing
4 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use super::*; | ||
|
||
#[command_handler("VERSION")] | ||
fn handle_version(server: &ClientServer, response: &dyn CommandResponse) -> CommandResult { | ||
response.numeric(make_numeric!( | ||
Version, | ||
server.name(), | ||
server.node().version() | ||
)); | ||
|
||
for v in server.isupport.data().iter() { | ||
response.numeric(make_numeric!(ISupport, v)) | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ mod handlers { | |
mod rename; | ||
mod topic; | ||
mod user; | ||
mod version; | ||
mod userhost; | ||
mod who; | ||
mod whois; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters