]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/chanserv.c
Couple of srvx updates.
[irc/evilnet/x3.git] / src / chanserv.c
index d05a4e5813f7a7ddaf8e4bc1f79d66c98c68e540..0a53c4632d432779cd8653fe8bc5efdef3a7bbbf 100644 (file)
@@ -4485,7 +4485,7 @@ static CHANSERV_FUNC(cmd_myaccess)
             continue;
         sbuf.used = 0;
         string_buffer_append_printf(&sbuf, "[%s (%d", cData->channel->name, uData->access);
-        if(uData->flags == USER_AUTO_OP)
+        if(uData->flags != 0)
             string_buffer_append(&sbuf, ',');
         if(IsUserSuspended(uData))
             string_buffer_append(&sbuf, 's');
@@ -6998,10 +6998,6 @@ channel_multiple_option(enum charOption option, struct userNode *user, struct ch
 
 static MODCMD_FUNC(chan_opt_automode)
 {
-    if(check_user_level(channel, user, lvlInviteMe, 1, 0))
-    {
-        reply("CSMSG_LOW_CHANNEL_ACCESS", channel->name);
-    }
     return channel_multiple_option(chAutomode, CSFUNC_ARGS);
 }
 
@@ -7038,7 +7034,7 @@ static MODCMD_FUNC(chan_opt_resync)
 static struct svccmd_list set_shows_list;
 
 static void
-handle_svccmd_unbind(struct svccmd *target) {
+handle_svccmd_unbind(struct svccmd *target, UNUSED_ARG(void *extra)) {
     unsigned int ii;
     for(ii=0; ii<set_shows_list.used; ++ii)
         if(target == set_shows_list.list[ii])
@@ -8059,11 +8055,11 @@ static CHANSERV_FUNC(cmd_8ball)
   word3 = argc>3?argv[3]:"";
 
 /*** COLOR *****/
-  if((word2) && strcasecmp(word1, "what") == 0 && strcasecmp(word2, "color") == 0)
+  if((word2) && strcasecmp(word1, "what") == 0 && ((strcasecmp(word2, "color") == 0) || (strcasecmp(word2, "colour") == 0)))
      eightball(eb, 1, accum);
-  else if((word3) && strcasecmp(word1, "what's") == 0 && strcasecmp(word2, "the") == 0 && strcasecmp(word3, "color") == 0)
+  else if((word3) && strcasecmp(word1, "what's") == 0 && strcasecmp(word2, "the") == 0 && ((strcasecmp(word2, "color") == 0) || (strcasecmp(word2, "colour") == 0)))
      eightball(eb, 1, accum);
-  else if((word3) && strcasecmp(word1, "whats") == 0 && strcasecmp(word2, "the") == 0 && strcasecmp(word3, "color") == 0)
+  else if((word3) && strcasecmp(word1, "whats") == 0 && strcasecmp(word2, "the") == 0 && ((strcasecmp(word2, "color") == 0) || (strcasecmp(word2, "colour") == 0)))
      eightball(eb, 1, accum);
 /*** LOCATION *****/
   else if(
@@ -8581,7 +8577,7 @@ chanserv_autojoin_channels(struct userNode *user)
 }
 
 static void
-handle_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle))
+handle_auth(struct userNode *user, UNUSED_ARG(struct handle_info *old_handle), UNUSED_ARG(void *extra))
 {
     struct mod_chanmode change;
     struct userData *channel;
@@ -8808,7 +8804,7 @@ handle_topic(struct userNode *user, struct chanNode *channel, const char *old_to
 }
 
 static void
-handle_mode(struct chanNode *channel, struct userNode *user, const struct mod_chanmode *change)
+handle_mode(struct chanNode *channel, struct userNode *user, const struct mod_chanmode *change, UNUSED_ARG(void *extra))
 {
     struct mod_chanmode *bounce = NULL;
     unsigned int bnc, ii;
@@ -8943,7 +8939,7 @@ static void handle_rename(struct handle_info *handle, const char *old_handle, UN
 }
 
 static void
-handle_unreg(UNUSED_ARG(struct userNode *user), struct handle_info *handle)
+handle_unreg(UNUSED_ARG(struct userNode *user), struct handle_info *handle, UNUSED_ARG(void *extra))
 {
     struct userNode *h_user;
 
@@ -9915,7 +9911,7 @@ chanserv_saxdb_write(struct saxdb_context *ctx)
 }
 
 static void
-chanserv_db_cleanup(void) {
+chanserv_db_cleanup(UNUSED_ARG(void *extra)) {
     unsigned int ii;
     unreg_part_func(handle_part, NULL);
     while(channelList)
@@ -9963,15 +9959,15 @@ init_chanserv(const char *nick)
         reg_new_channel_func(handle_new_channel, NULL);
         reg_join_func(handle_join, NULL);
         reg_part_func(handle_part, NULL);
-        reg_kick_func(handle_kick);
+        reg_kick_func(handle_kick, NULL);
         reg_topic_func(handle_topic, NULL);
-        reg_mode_change_func(handle_mode);
+        reg_mode_change_func(handle_mode, NULL);
         reg_nick_change_func(handle_nick_change, NULL);
-        reg_auth_func(handle_auth);
+        reg_auth_func(handle_auth, NULL);
     }
 
     reg_handle_rename_func(handle_rename, NULL);
-    reg_unreg_func(handle_unreg);
+    reg_unreg_func(handle_unreg, NULL);
 
     handle_dnrs = dict_new();
     dict_set_free_data(handle_dnrs, free);
@@ -9980,7 +9976,7 @@ init_chanserv(const char *nick)
     mask_dnrs = dict_new();
     dict_set_free_data(mask_dnrs, free);
 
-    reg_svccmd_unbind_func(handle_svccmd_unbind);
+    reg_svccmd_unbind_func(handle_svccmd_unbind, NULL);
     chanserv_module = module_register("ChanServ", CS_LOG, "chanserv.help", chanserv_expand_variable);
     DEFINE_COMMAND(register, 1, MODCMD_REQUIRE_AUTHED, "flags", "+acceptchan,+channel", NULL);
     DEFINE_COMMAND(noregister, 1, MODCMD_REQUIRE_AUTHED, "flags", "+helping", NULL);
@@ -10180,7 +10176,7 @@ init_chanserv(const char *nick)
         }    
     }
 
-    reg_exit_func(chanserv_db_cleanup);
+    reg_exit_func(chanserv_db_cleanup, NULL);
     message_register_table(msgtab);
 }