-
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.
currently returns: - copyright info - author info - website and irc channel - version - build date
- Loading branch information
1 parent
1156d54
commit 14e0f20
Showing
6 changed files
with
49 additions
and
2 deletions.
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,21 @@ | ||
Sable -- | ||
|
||
Copyright (c) 2021-2024 Sable Development Team | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published | ||
by the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
Source code is available at: https://github.com/Libera-Chat/sable | ||
|
||
Development is led by: | ||
|
||
spb <[email protected]> | ||
val <[email protected]> | ||
|
||
A full list of contributors can be found in the git log. | ||
|
||
Visit the Sable website at: https://sable.chat/ | ||
Visit us on IRC at irc.libera.chat #libera-dev | ||
|
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,22 @@ | ||
use super::*; | ||
|
||
#[command_handler("INFO")] | ||
/// Syntax: INFO | ||
fn info_handler( | ||
response: &dyn CommandResponse, | ||
server: &ClientServer, | ||
) -> CommandResult { | ||
let node = server.node(); | ||
let version = node.version(); | ||
let build_date = node.build_date(); | ||
|
||
for line in &server.info_strings.info { | ||
response.numeric(make_numeric!(Info, line)); | ||
} | ||
response.numeric(make_numeric!(Info, &format!("Version: {version}"))); | ||
response.numeric(make_numeric!(Info, &format!("Build date: {build_date}"))); | ||
// TODO: send configuration info to opers | ||
// see: https://github.com/solanum-ircd/solanum/blob/main/modules/m_info.c#L788 | ||
response.numeric(make_numeric!(EndOfInfo)); | ||
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 |
---|---|---|
|
@@ -42,6 +42,7 @@ mod handlers { | |
mod ban; | ||
mod cap; | ||
mod chathistory; | ||
mod info; | ||
mod invite; | ||
mod join; | ||
mod kick; | ||
|
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