]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Someone doesnt validate their input.... ;-p
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 19 Mar 2006 22:41:01 +0000 (22:41 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 19 Mar 2006 22:41:01 +0000 (22:41 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3741 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_remove.cpp

index 5cbc384990934d7bca08b0f2a1c68fb58912fba3..242aaefb3edf9cca65d1bca7e1838492bfe9a84b 100644 (file)
@@ -60,10 +60,16 @@ class cmd_remove : public command_t
                userrec* target = Srv->FindNick(std::string(parameters[0]));
                /* And the channel we're meant to be removing them from */
                chanrec* channel = Srv->FindChannel(std::string(parameters[1]));
+
+               /* Fix by brain - someone needs to learn to validate their input! */
+               if (!target || !channel)
+                       return;
+
                /* And see if the person calling the command has access to use it on the channel */
                std::string privs = Srv->ChanMode(user, channel);
                /* Check what privs the person being removed has */
                std::string targetprivs = Srv->ChanMode(target, channel);
+
                int tlevel;
                int ulevel;
                int n = 2;