]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/mode.cpp
Note to self, cast time_t to long int for printf... thanks Ankit for pointing this...
[user/henk/code/inspircd.git] / src / mode.cpp
index 14b465c6ec332e7ab36f5ef437479dd756eb5482..f2bbb98e5e7f5e4bdd89eeeead634d8b096d6321 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -174,10 +174,6 @@ SimpleChannelModeHandler::SimpleChannelModeHandler(InspIRCd* Instance, char mode
 
 ModeAction SimpleUserModeHandler::OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool servermode)
 {
-       /* Only opers can change other users modes */
-       if (source != dest)
-               return MODEACTION_DENY;
-
        if (adding)
        {
                if (!dest->IsModeSet(this->GetModeChar()))
@@ -1014,7 +1010,7 @@ std::string ModeParser::ModeString(User* user, Channel* channel, bool nick_suffi
                return types;
 }
 
-std::string ModeParser::ChanModes()
+std::string ModeParser::GiveModeList(ModeMasks m)
 {
        std::string type1;      /* Listmodes EXCEPT those with a prefix */
        std::string type2;      /* Modes that take a param when adding or removing */
@@ -1026,7 +1022,7 @@ std::string ModeParser::ChanModes()
                if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h'))
                        continue;
 
-               unsigned char pos = (mode-65) | MASK_CHANNEL;
+               unsigned char pos = (mode-65) | m;
                 /* One parameter when adding */
                if (modehandlers[pos])
                {