summaryrefslogtreecommitdiff
path: root/handle.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-12 02:39:23 -0500
committerC. McEnroe2020-02-12 02:39:23 -0500
commit489df70c37d49ab17b396dcffc6776e2ba7829ed (patch)
treed81e0f1379a08da3cc1183b7850c591469068877 /handle.c
parent456713e561b73ecfeb0d84d9afff2f3a8cd91cbb (diff)
Add /list
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/handle.c b/handle.c
index 0db362b..260d43c 100644
--- a/handle.c
+++ b/handle.c
@@ -411,6 +411,24 @@ static void handleTopic(struct Message *msg) {
}
}
+static void handleReplyList(struct Message *msg) {
+ require(msg, false, 4);
+ if (!replies.list) return;
+ uiFormat(
+ Network, Warm, tagTime(msg),
+ "In \3%02d%s\3 are %ld under the banner: %s",
+ hash(msg->params[1]), msg->params[1],
+ strtol(msg->params[2], NULL, 10),
+ msg->params[3]
+ );
+}
+
+static void handleReplyListEnd(struct Message *msg) {
+ (void)msg;
+ if (!replies.list) return;
+ replies.list--;
+}
+
static void handleReplyWhoisUser(struct Message *msg) {
require(msg, false, 6);
if (!replies.whois) return;
@@ -657,6 +675,8 @@ static const struct Handler {
{ "317", handleReplyWhoisIdle },
{ "318", handleReplyEndOfWhois },
{ "319", handleReplyWhoisChannels },
+ { "322", handleReplyList },
+ { "323", handleReplyListEnd },
{ "330", handleReplyWhoisGeneric },
{ "331", handleReplyNoTopic },
{ "332", handleReplyTopic },