]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/core/m_message.c
Looks like irc_dictionary things cannot support more than one key with the same value...
[irc/rqf/shadowircd.git] / modules / core / m_message.c
index 0a78302330de447fd4a2c676ac84bfd357d6fe91..010150038ed81f00bea7e59f097f59d7ad430ad2 100644 (file)
@@ -736,6 +736,7 @@ msg_client(int p_or_n, const char *command,
        struct Metadata *md;
        struct DictionaryIter iter;
        int oaccept = 0;
+       char *text3 = rb_strdup("");
 
        if(MyClient(source_p))
        {
@@ -798,9 +799,10 @@ msg_client(int p_or_n, const char *command,
                {
                        if (IsOper(source_p))
                        {
+                               rb_sprintf(text3, "O%s", source_p->id);
                                DICTIONARY_FOREACH(md, &iter, target_p->user->metadata)
                                {
-                                       if(!strcmp(md->value, source_p->id))
+                                       if(!strcmp(md->value, "OACCEPT") && !strcmp(md->name, text3))
                                        {
                                                oaccept = 1;
                                                break;