]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
Update HOOKTYPE_CHANNEL_SYNCED to get rid of compiler warning.
authorBram Matthys <redacted>
Sun, 22 Apr 2018 14:02:13 +0000 (16:02 +0200)
committerBram Matthys <redacted>
Sun, 22 Apr 2018 14:02:13 +0000 (16:02 +0200)
Can't safely use shorts with variable argument functions I think,
or maybe only with reduced type checking which is not what we want.
-void hooktype_channel_synced(aChannel *chptr, unsigned short merge, unsigned short removetheirs, unsigned short nomode);
+void hooktype_channel_synced(aChannel *chptr, int merge, int removetheirs, int nomode);

include/modules.h
src/modules/chanmodes/secureonly.c

index 5963e0de986361378573053e0f346745acbfb4e2..e114fea84d9814045336ff7b39640f8438e5e0a3 100644 (file)
@@ -890,7 +890,7 @@ int hooktype_view_topic_outside_channel(aClient *sptr, aChannel *chptr);
 int hooktype_chan_permit_nick_change(aClient *sptr, aChannel *chptr);
 int hooktype_is_channel_secure(aChannel *chptr);
 int hooktype_can_send_secure(aClient *sptr, aChannel *chptr);
-void hooktype_channel_synced(aChannel *chptr, unsigned short merge, unsigned short removetheirs, unsigned short nomode);
+void hooktype_channel_synced(aChannel *chptr, int merge, int removetheirs, int nomode);
 int hooktype_can_sajoin(aClient *target, aChannel *chptr, aClient *sptr);
 int hooktype_whois(aClient *sptr, aClient *target);
 int hooktype_check_init(aClient *cptr, char *sockname, size_t size);
index d6011cdff6d67dc9072d770186a865a4cd31da74..7a1be8f3998dea5496843c0722631f80b723279b 100644 (file)
@@ -32,11 +32,11 @@ Cmode_t EXTCMODE_SSLONLY;
 
 #define IsSecureOnly(chptr)    (chptr->mode.extmode & EXTCMODE_SSLONLY)
 
-int secureonly_check_join (aClient *sptr, aChannel *chptr, char *key, char *parv[]);
-void secureonly_channel_sync (aChannel* chptr, unsigned short merge, unsigned short removetheirs, unsigned short nomode);
-int secureonly_check_send (aClient *acptr, aChannel* chptr);
-int secureonly_check_secure (aChannel* chptr);
-int secureonly_check_sajoin (aClient *acptr, aChannel* chptr, aClient *sptr);
+int secureonly_check_join(aClient *sptr, aChannel *chptr, char *key, char *parv[]);
+void secureonly_channel_sync (aChannel* chptr, int merge, int removetheirs, int nomode);
+int secureonly_check_send(aClient *acptr, aChannel* chptr);
+int secureonly_check_secure(aChannel* chptr);
+int secureonly_check_sajoin(aClient *acptr, aChannel* chptr, aClient *sptr);
 int secureonly_specialcheck(aClient *sptr, aChannel *chptr, char *parv[]);
 
 MOD_TEST(sslonly)
@@ -114,7 +114,7 @@ static void secureonly_kick_insecure_users(aChannel *chptr)
        }
 }
 
-int secureonly_check_join (aClient *sptr, aChannel *chptr, char *key, char *parv[])
+int secureonly_check_join(aClient *sptr, aChannel *chptr, char *key, char *parv[])
 {
        Link *lp;
 
@@ -134,7 +134,7 @@ int secureonly_check_join (aClient *sptr, aChannel *chptr, char *key, char *parv
        return 0;
 }
 
-int secureonly_check_secure (aChannel* chptr)
+int secureonly_check_secure(aChannel *chptr)
 {
        if (IsSecureOnly(chptr))
        {
@@ -144,7 +144,7 @@ int secureonly_check_secure (aChannel* chptr)
        return 0;
 }
 
-void secureonly_channel_sync (aChannel* chptr, unsigned short merge, unsigned short removetheirs, unsigned short nomode)
+void secureonly_channel_sync(aChannel *chptr, int merge, int removetheirs, int nomode)
 {
        if ((!merge && !removetheirs && !nomode) || (merge && !nomode))
        {
@@ -152,7 +152,7 @@ void secureonly_channel_sync (aChannel* chptr, unsigned short merge, unsigned sh
        }
 }
 
-int secureonly_check_send (aClient *acptr, aChannel* chptr)
+int secureonly_check_send(aClient *acptr, aChannel *chptr)
 {
        if (IsSecureOnly(chptr))
                if (!IsSecure(acptr))
@@ -161,7 +161,7 @@ int secureonly_check_send (aClient *acptr, aChannel* chptr)
        return HOOK_CONTINUE;
 }
 
-int secureonly_check_sajoin (aClient *acptr, aChannel* chptr, aClient *sptr)
+int secureonly_check_sajoin(aClient *acptr, aChannel *chptr, aClient *sptr)
 {
        if (IsSecureOnly(chptr) && !IsSecure(acptr))
        {