]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
m_namesx Handle colons in channel names properly
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index b3cbbc976be8d1758098cd74afbdaf6d133359bf..197bbc1bf9823a26086c44f6b2c0978baf07113c 100644 (file)
@@ -158,7 +158,7 @@ class CommandShun : public Command
                        else
                        {
                                delete r;
-                               user->WriteServ("NOTICE %s :*** Shun for %s already exists", user->nick.c_str(), expr.c_str());
+                               user->WriteServ("NOTICE %s :*** Shun for %s already exists", user->nick.c_str(), target.c_str());
                                return CMD_FAILURE;
                        }
                }
@@ -264,10 +264,10 @@ class ModuleShun : public Module
                        /* Allow QUIT but dont show any quit message */
                        parameters.clear();
                }
-               else if (command == "PART")
+               else if ((command == "PART") && (parameters.size() > 1))
                {
                        /* same for PART */
-                       parameters[1] = "";
+                       parameters[1].clear();
                }
 
                /* if we're here, allow the command. */