*/
+/* $ModDesc: Provides user and channel +G mode */
+
#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_DEPRECATE
typedef std::map<irc::string,irc::string> censor_t;
-/* $ModDesc: Provides user and channel +G mode */
-
/** Handles usermode +G
*/
class CensorUser : public SimpleUserModeHandler
for (int index = 0; index < MyConf.Enumerate("badword"); index++)
{
- irc::string pattern = (MyConf.ReadValue("badword","text",index)).c_str();
- irc::string replace = (MyConf.ReadValue("badword","replace",index)).c_str();
- censors[pattern] = replace;
+ std::string str = MyConf.ReadValue("badword","text",index);
+ irc::string pattern(str.c_str());
+ str = MyConf.ReadValue("badword","replace",index);
+ censors[pattern] = irc::string(str.c_str());
}
}