]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/channel.c
Change all override snotes to wallops to match m_o* and to
[irc/rqf/shadowircd.git] / src / channel.c
index f18c94f77e8baccbe09fba6610768b0de5e9f8b0..ff77a3a02fa3ed6bf57f1cc2458fa2c88648f0b8 100644 (file)
@@ -826,6 +826,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
        char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
        char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
        char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
+       char *text = rb_strdup("");
        int use_althost = 0;
        int i = 0;
        hook_data_channel moduledata;
@@ -836,9 +837,12 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
 
        if(IsOverride(source_p))
        {
-               sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
+               sendto_wallops_flags(UMODE_WALLOP, &me,
                                "%s is overriding JOIN to [%s]",
                                get_oper_name(source_p), chptr->chname);
+               sendto_server(NULL, chptr, NOCAPS, NOCAPS,
+                               ":%s WALLOPS :%s is overriding JOIN to [%s]",
+                               use_id(source_p), get_oper_name(source_p), chptr->chname);
                return 0;
        }
 
@@ -864,12 +868,14 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
        if((is_banned(chptr, source_p, NULL, src_host, src_iphost)) == CHFL_BAN)
                return (ERR_BANNEDFROMCHAN);
 
+       rb_sprintf(text, "K%s", source_p->id);
+
        DICTIONARY_FOREACH(md, &iter, chptr->metadata)
        {
-               if(!strcmp(md->name, "KICKNOREJOIN") && !strcmp(md->value, source_p->id) && (md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time()))
+               if(!strcmp(md->value, "KICKNOREJOIN") && !strcmp(md->name, text) && (md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time()))
                        return ERR_KICKNOREJOIN;
                /* cleanup any stale KICKNOREJOIN metadata we find while we're at it */
-               if(!strcmp(md->name, "KICKNOREJOIN") && !(md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time()))  
+               if(!strcmp(md->value, "KICKNOREJOIN") && !(md->timevalue + ConfigChannel.kick_no_rejoin_time > rb_current_time()))  
                        channel_metadata_delete(chptr, md->name, 0);
        }