fixed 0 fakehost if srvx tries to tell us that theres no fakehost
[ircu2.10.12-pk.git] / ircd / m_relay.c
index fc8e1cd4ce4bb356eefa65d36b1a4e2c91563c28..8aa687e0b6b6ebff06e7dc53c482e403eba78a7b 100644 (file)
@@ -39,7 +39,7 @@ static void loc_handler_LR(const char *num, char *parv[], signed int parc) {
 static void loc_handler_LA(const char *num, char *parv[], signed int parc) {
     if(num[0] != '!' || parc < 1) return;
        char *fakehost = NULL;
-       if (parc > 1 && parv[1] != "0")
+       if (parc > 1 && !strcmp(parv[1], "0")) // 0 = no fakehost
                fakehost=parv[1];
                
     if(parc > 2)
@@ -230,7 +230,8 @@ signed int ms_relay(struct Client* cptr, struct Client* sptr, signed int parc, c
         struct Client *acptr;
         struct Channel *chptr;
         if(acptr = findNUser(parv[1])) {
-         if(chptr = FindChannel(parv[3]) && chptr->mode.altchan && 
+         if(IsChannelName(parv[3]) && strIsIrcCh(parv[3]) && 
+         (chptr = FindChannel(parv[3])) && chptr->mode.altchan && 
             IsChannelName(chptr->mode.altchan) && strIsIrcCh(chptr->mode.altchan)) {
        mode_a_check_altchan(acptr,chptr->mode.altchan);
          }