diff options
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r-- | src/plugins/irc/irc-server.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 2695dbff1..f7b2138f2 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1001,6 +1001,25 @@ irc_server_get_isupport_value (struct t_irc_server *server, const char *feature) } /* + * Gets "chantypes" for the server: + * - if server is NULL, returns pointer to irc_channel_default_chantypes + * - if server is not NULL, returns either chantypes in the server or + * server option "default_chantypes" + */ + +const char * +irc_server_get_chantypes (struct t_irc_server *server) +{ + if (!server) + return irc_channel_default_chantypes; + + if (server->chantypes) + return server->chantypes; + + return IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_CHANTYPES); +} + +/* * Sets "prefix_modes" and "prefix_chars" in server using value of PREFIX in IRC * message 005. * |