diff options
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/root_commands.c b/root_commands.c index 9acc30f0..add9bceb 100644 --- a/root_commands.c +++ b/root_commands.c @@ -654,6 +654,23 @@ static void cmd_channel(irc_t *irc, char **cmd) "channels you're still in cannot be deleted).", irc->default_channel->name); } + } else if (len >= 1 && g_strncasecmp(cmd[2], "rename", len) == 0) { + if (strlen(cmd[3]) < 1) { + irc_rootmsg(irc, "You have to specify new name."); + } else if (!(ic->flags & IRC_CHANNEL_JOINED) && + ic != ic->irc->default_channel) { + if (irc_channel_name_hint(ic, cmd[3])) { + irc_rootmsg(irc, "Channel %s renamed to %s.", + cmd[1], cmd[3]); + } else { + irc_rootmsg(irc, "Failed to rename channel %s to %s.", + cmd[1], cmd[3]); + } + } else { + irc_rootmsg(irc, "Couldn't rename channel (main channel %s or " + "channels you're still in cannot be renamed).", + irc->default_channel->name); + } } else { irc_rootmsg(irc, "Unknown command: %s [...] %s. Please use \x02help commands\x02 to get a list of available commands.", "channel", @@ -1400,6 +1417,13 @@ static void cmd_nick(irc_t *irc, char **cmd) irc_rootmsg(irc, "This command is deprecated. Try: account %s set display_name", cmd[1]); } +#ifdef WITH_GNUTLS +static void cmd_certfp(irc_t *irc, char **cmd) +{ + irc_rootmsg(irc, "Show current/set new certfp"); +} +#endif + /* Maybe this should be a stand-alone command as well? */ static void bitlbee_whatsnew(irc_t *irc) { @@ -1451,6 +1475,9 @@ command_t root_commands[] = { { "set", 0, cmd_set, 0 }, { "transfer", 0, cmd_transfer, 0 }, { "yes", 0, cmd_yesno, 0 }, +#ifdef WITH_GNUTLS + { "certfp", 1, cmd_certfp, 0 }, +#endif /* Not expecting too many plugins adding root commands so just make a dumb array with some empty entried at the end. */ { NULL }, |