* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
fprefix = fpre.empty() ? '!' : fpre[0];
Aliases.clear();
- for (int i = 0;; i++)
+ ConfigTagList tags = ServerInstance->Config->ConfTags("alias");
+ for(ConfigIter i = tags.first; i != tags.second; ++i)
{
- ConfigTag* tag = ServerInstance->Config->ConfValue("alias", i);
- if (!tag)
- break;
+ ConfigTag* tag = i->second;
Alias a;
a.AliasedCommand = tag->getString("text").c_str();
tag->readString("replace", a.ReplaceFormat, true);
a.RequiredNick = tag->getString("requires");
a.ULineOnly = tag->getBool("uline");
- a.ChannelCommand = tag->getBool("channelcommand", "no");
- a.UserCommand = tag->getBool("usercommand", "yes");
+ a.ChannelCommand = tag->getBool("channelcommand", false);
+ a.UserCommand = tag->getBool("usercommand", true);
a.OperOnly = tag->getBool("operonly");
a.format = tag->getString("format");
a.CaseSensitive = tag->getBool("matchcase");
return word;
}
- virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, User *user, bool validated, const std::string &original_line)
+ virtual ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line)
{
std::multimap<irc::string, Alias>::iterator i, upperbound;