diff options
author | June McEnroe <june@causal.agency> | 2020-02-15 05:29:54 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-15 05:29:54 -0500 |
commit | 9b1ab699084190b23953bff7f4ce5410808ab850 (patch) | |
tree | 8795886c47dd89d000831f5877676c4a18c83ec7 /handle.c | |
parent | Show prefixes in NAMES and WHOIS replies (diff) | |
download | catgirl-9b1ab699084190b23953bff7f4ce5410808ab850.tar.gz catgirl-9b1ab699084190b23953bff7f4ce5410808ab850.zip |
Track PREFIX modes and CHANMODES
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/handle.c b/handle.c index 6447634..b68ae45 100644 --- a/handle.c +++ b/handle.c @@ -220,9 +220,14 @@ static void handleReplyISupport(struct Message *msg) { } else if (!strcmp(key, "CHANTYPES")) { set(&network.chanTypes, msg->params[i]); } else if (!strcmp(key, "PREFIX")) { - strsep(&msg->params[i], ")"); - if (!msg->params[i]) continue; + strsep(&msg->params[i], "("); + set(&network.prefixModes, strsep(&msg->params[i], ")")); set(&network.prefixes, msg->params[i]); + } else if (!strcmp(key, "CHANMODES")) { + set(&network.listModes, strsep(&msg->params[i], ",")); + set(&network.paramModes, strsep(&msg->params[i], ",")); + set(&network.setParamModes, strsep(&msg->params[i], ",")); + set(&network.channelModes, strsep(&msg->params[i], ",")); } } } |