]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ojoin.cpp
Delete modewatchers when unloading modules that use them to keep the server from...
[user/henk/code/inspircd.git] / src / modules / m_ojoin.cpp
index d5f7b9443f8c77ce93cf773e1b1562ad1ef8cbe4..122e1fa30dc5cbacaedc0fd88512b231d723670d 100644 (file)
@@ -103,31 +103,6 @@ class NetworkPrefix : public ModeHandler
                m_paramtype = TR_NICK;
        }
 
-       ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string &parameter)
-       {
-               User* x = ServerInstance->FindNick(parameter);
-               if (x)
-               {
-                       Membership* m = channel->GetUser(x);
-                       if (!m)
-                       {
-                               return std::make_pair(false, parameter);
-                       }
-                       else
-                       {
-                               if (m->hasMode('Y'))
-                               {
-                                       return std::make_pair(true, x->nick);
-                               }
-                               else
-                               {
-                                       return std::make_pair(false, parameter);
-                               }
-                       }
-               }
-               return std::make_pair(false, parameter);
-       }
-
        void RemoveMode(Channel* channel, irc::modestacker* stack)
        {
                const UserMembList* cl = channel->GetUsers();
@@ -251,8 +226,8 @@ class ModuleOjoin : public Module
 
                ServerInstance->AddCommand(&mycommand);
 
-               Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserKick, I_OnUserPart, I_OnUserPreKick, I_OnRehash };
-               ServerInstance->Modules->Attach(eventlist, this, 5);
+               Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserPreKick, I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
        ModResult OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)