Track PREFIX modes and CHANMODES
parent
cd341076c0
commit
9b1ab69908
5
chat.h
5
chat.h
|
@ -87,6 +87,11 @@ extern struct Network {
|
||||||
char *name;
|
char *name;
|
||||||
char *chanTypes;
|
char *chanTypes;
|
||||||
char *prefixes;
|
char *prefixes;
|
||||||
|
char *prefixModes;
|
||||||
|
char *listModes;
|
||||||
|
char *paramModes;
|
||||||
|
char *setParamModes;
|
||||||
|
char *channelModes;
|
||||||
} network;
|
} network;
|
||||||
|
|
||||||
extern struct Self {
|
extern struct Self {
|
||||||
|
|
9
handle.c
9
handle.c
|
@ -220,9 +220,14 @@ static void handleReplyISupport(struct Message *msg) {
|
||||||
} else if (!strcmp(key, "CHANTYPES")) {
|
} else if (!strcmp(key, "CHANTYPES")) {
|
||||||
set(&network.chanTypes, msg->params[i]);
|
set(&network.chanTypes, msg->params[i]);
|
||||||
} else if (!strcmp(key, "PREFIX")) {
|
} else if (!strcmp(key, "PREFIX")) {
|
||||||
strsep(&msg->params[i], ")");
|
strsep(&msg->params[i], "(");
|
||||||
if (!msg->params[i]) continue;
|
set(&network.prefixModes, strsep(&msg->params[i], ")"));
|
||||||
set(&network.prefixes, 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], ","));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue