*
* ---------------------------------------------------
*/
+
+/* <3's to Lauren for original info on mIRC's weird behaviour */
#include <string>
#include <time.h>
return Version(1,0,0,0,VF_VENDOR);
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string ¶meter)
{
ConfigReader* Conf = new ConfigReader;
else
action = IBLOCK_KILLOPERS;
- delete Conf;
+ DELETE(Conf);
}
- virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, char **parameters, int pcnt, userrec *user, bool validated)
{
// Don't do anything with unregistered users, or remote ones.
if(!user || (user->registered != 7) || !IS_LOCAL(user))
if((*c == ',') && *(c+1) && (*(c+1) == '#'))
targets++;
- for(unsigned int i = 0; i < user->chans.size(); i++)
- if(user->chans[i].channel)
+ for(std::vector<ucrec*>::iterator f = user->chans.begin(); f != user->chans.end(); f++)
+ if(((ucrec*)(*f))->channel)
userchans++;
// Check that this message wasn't already sent within a few seconds.
BlockedMessage* m = (BlockedMessage*)user->GetExt("amsgblock");
if(m)
{
- delete m;
+ DELETE(m);
user->Shrink("amsgblock");
}
}
{
return new ModuleBlockAmsgFactory;
}
-