summaryrefslogtreecommitdiff
path: root/functions.h
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2022-11-25 00:03:17 +0000
committerLuke Bratch <luke@bratch.co.uk>2022-11-25 00:03:17 +0000
commitae1390b2bef4dc6a1a113cddaee37d745b559b1f (patch)
treea5f3894e616ae387c079ae03048461afe0854994 /functions.h
parent2e665e03b6175b3f31f0ef1e058183417df1456e (diff)
Implement fake QUIT handling via a NOTICE when doing a replay.
Since user QUIT messages don't contain channel names, clients that didn't know which channels a nick was in when receiving a quit message for that nick can't show a per-channel QUIT notification. Some clients just display the QUIT message in the server status window, others silently ignore it. Cater for those clients by sending a NOTICE about the QUIT rather than replaying it - assuming the nick isn't still in any of our channels.
Diffstat (limited to 'functions.h')
-rw-r--r--functions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.h b/functions.h
index 28b6413..5799aa6 100644
--- a/functions.h
+++ b/functions.h
@@ -205,6 +205,10 @@ int removenickfromallchannels(char *nickuserhost, struct channel *channels, int
// Returns 1 on success or 0 on failure
int updatenickinallchannels(char *nickuserhost, char *newnick, struct channel *channels, int maxchannelcount);
+// Check if "nick" is in a channel or not.
+// Return 1 if it is, or 0 if not.
+int isnickinanychannel(struct channel *channels, int maxchannelcount, char *nick);
+
// Populate our channels struct with all nicks in a RPL_NAMREPLY
// Returns 1 on success or 0 on failure
int addnamereplytochannel(char *namereply, struct channel *channels, int maxchannelcount);