Changeset b441614


Ignore:
Timestamp:
2015-06-17T23:24:26Z (5 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
114154c
Parents:
b75671d
Message:

Fix HANDLE_DOMAINS + add command nick argument compatibility.

The order was wrong, it'd set the nick for $NAKED_HANDLE and then add
$NAKED_HANDLE@$DOMAIN which is pretty pointless.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    rb75671d rb441614  
    661661        }
    662662
     663        if ((a->flags & ACC_FLAG_HANDLE_DOMAINS) && cmd[2][0] != '_' &&
     664            (!(s = strchr(cmd[2], '@')) || s[1] == '\0')) {
     665                /* If there's no @ or it's the last char, append the user's
     666                   domain name now. Exclude handles starting with a _ so
     667                   adding _xmlconsole will keep working. */
     668                if (s) {
     669                        *s = '\0';
     670                }
     671                if ((s = strchr(a->user, '@'))) {
     672                        cmd[2] = handle = g_strconcat(cmd[2], s, NULL);
     673                }
     674        }
     675
    663676        if (cmd[3]) {
    664677                if (!nick_ok(irc, cmd[3])) {
     
    670683                } else {
    671684                        nick_set_raw(a, cmd[2], cmd[3]);
    672                 }
    673         }
    674 
    675         if ((a->flags & ACC_FLAG_HANDLE_DOMAINS) && cmd[2][0] != '_' &&
    676             (!(s = strchr(cmd[2], '@')) || s[1] == '\0')) {
    677                 /* If there's no @ or it's the last char, append the user's
    678                    domain name now. Exclude handles starting with a _ so
    679                    adding _xmlconsole will keep working. */
    680                 if (s) {
    681                         *s = '\0';
    682                 }
    683                 if ((s = strchr(a->user, '@'))) {
    684                         cmd[2] = handle = g_strconcat(cmd[2], s, NULL);
    685685                }
    686686        }
Note: See TracChangeset for help on using the changeset viewer.