]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/s_user.c
Fix crash if identify_service/identify_command were not specified in ircd.conf.
[irc/rqf/shadowircd.git] / src / s_user.c
index b2c0c4e96f1eb6118a02a9b399a8c357fccb6dcc..080e1b440907540fc7babfbb054c356f230bc558 100644 (file)
@@ -336,7 +336,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
                }
 
                /* dont replace username if its supposed to be spoofed --fl */
-               if(!IsConfDoSpoofIp(aconf) || !strchr(aconf->name, '@'))
+               if(!IsConfDoSpoofIp(aconf) || !strchr(aconf->info.name, '@'))
                {
                        p = username;
 
@@ -655,8 +655,8 @@ introduce_client(struct Client *client_p, struct Client *source_p, struct User *
 
        if(MyConnect(source_p) && source_p->localClient->passwd)
        {
-               if (ConfigFileEntry.identifyservice[0] != '\0' &&
-                               ConfigFileEntry.identifycommand[0] != '\0')
+               if (!EmptyString(ConfigFileEntry.identifyservice) &&
+                               !EmptyString(ConfigFileEntry.identifycommand))
                {
                        /* use user@server */
                        p = strchr(ConfigFileEntry.identifyservice, '@');
@@ -1031,8 +1031,6 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
 
                                Count.oper--;
 
-                               /* Do we need to propegate these? I'm not 100% sure
-                                * so we should test it when we have a testnet */
                                user_metadata_delete(source_p, "OPERSTRING", 1);
                                user_metadata_delete(source_p, "SWHOIS", 1);
 
@@ -1340,12 +1338,15 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
        if(oper_p->swhois)
                user_metadata_add(source_p, "SWHOIS", oper_p->swhois, 1);
 
-       if(oper_p->vhost || !EmptyString(ConfigFileEntry.default_operhost))
+       if(oper_p->operstring)
+               user_metadata_add(source_p, "OPERSTRING", oper_p->operstring, 1);
+
+       if(oper_p->vhost || !EmptyString(GlobalSetOptions.operhost))
        {
                if(oper_p->vhost)
                        change_nick_user_host(source_p, source_p->name, source_p->username, oper_p->vhost, 0, "Changing host");
                else
-                       change_nick_user_host(source_p, source_p->name, source_p->username, ConfigFileEntry.default_operhost, 0, "Changing host");
+                       change_nick_user_host(source_p, source_p->name, source_p->username, GlobalSetOptions.operhost, 0, "Changing host");
                
                sendto_one_numeric(source_p, RPL_HOSTHIDDEN, "%s :is now your hidden host (set by %s)", source_p->host, source_p->servptr->name);
 
@@ -1520,7 +1521,7 @@ change_nick_user_host(struct Client *target_p,    const char *nick, const char *use
                        chptr = mscptr->chptr;
                        mptr = mode;
 
-                       if(is_owner(mscptr))
+                       if(is_admin(mscptr))
                        {
                                *mptr++ = 'a';
                                strcat(modeval, nick);