]> jfr.im git - solanum.git/blobdiff - modules/core/m_message.c
Merge pull request #334 from edk0/massnotice
[solanum.git] / modules / core / m_message.c
index afc8e04fef0c69ea32e6ce26609b6df9c572f370..3c31554a65d0f7658cd259d8f6953e845dc13775 100644 (file)
@@ -776,6 +776,9 @@ msg_client(enum message_type msgtype,
                if (do_floodcount &&
                                flood_attack_client(msgtype, source_p, target_p))
                        return;
+
+               if (IsCapable(source_p, CLICAP_ECHO_MESSAGE) && target_p != source_p)
+                       sendto_anywhere_echo(target_p, source_p, cmdname[msgtype], ":%s", text);
        }
        else if(source_p->from == target_p->from)
        {
@@ -955,7 +958,6 @@ handle_special(enum message_type msgtype, struct Client *client_p,
 {
        struct Client *target_p;
        char *server;
-       char *s;
 
        /* user[%host]@server addressed?
         * NOTE: users can send to user@server, but not user%host@server
@@ -1032,22 +1034,6 @@ handle_special(enum message_type msgtype, struct Client *client_p,
                        return;
                }
 
-               if((s = strrchr(nick, '.')) == NULL)
-               {
-                       sendto_one_numeric(source_p, ERR_NOTOPLEVEL,
-                                          form_str(ERR_NOTOPLEVEL), nick);
-                       return;
-               }
-               while(*++s)
-                       if(*s == '.' || *s == '*' || *s == '?')
-                               break;
-               if(*s == '*' || *s == '?')
-               {
-                       sendto_one_numeric(source_p, ERR_WILDTOPLEVEL,
-                                          form_str(ERR_WILDTOPLEVEL), nick);
-                       return;
-               }
-
                sendto_match_butone(IsServer(client_p) ? client_p : NULL, source_p,
                                    nick + 1,
                                    (*nick == '#') ? MATCH_HOST : MATCH_SERVER,