diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alias.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_cgiirc.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_dccallow.cpp | 20 | ||||
-rw-r--r-- | src/modules/m_denychans.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_dnsbl.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 16 | ||||
-rw-r--r-- | src/modules/m_filter.h | 20 | ||||
-rw-r--r-- | src/modules/m_hash.h | 6 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_md5.cpp | 20 | ||||
-rw-r--r-- | src/modules/m_nicklock.cpp | 22 | ||||
-rw-r--r-- | src/modules/m_password_hash.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_proxyscan.cpp | 6 |
14 files changed, 76 insertions, 76 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 5a6850f61..1e7c87241 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -197,10 +197,10 @@ class ModuleAlias : public Module else { irc::sepstream commands(Aliases[i].replace_with, '\n'); - std::string command; - while (commands.GetToken(command)) + std::string scommand; + while (commands.GetToken(scommand)) { - DoCommand(command, user, safe); + DoCommand(scommand, user, safe); } return 1; } diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index e854b8d4e..53fdb6ff7 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -33,8 +33,8 @@ public: CGItype type; std::string password; - CGIhost(const std::string &mask = "", CGItype t = IDENTFIRST, const std::string &password ="") - : hostmask(mask), type(t), password(password) + CGIhost(const std::string &mask = "", CGItype t = IDENTFIRST, const std::string &spassword ="") + : hostmask(mask), type(t), password(spassword) { } }; @@ -53,11 +53,12 @@ typedef std::vector<CGIhost> CGIHostlist; */ class CommandWebirc : public Command { + // XXX why is inspircd declared here? does class command not have one? InspIRCd* Me; CGIHostlist Hosts; bool notify; public: - CommandWebirc(InspIRCd* Me, CGIHostlist &Hosts, bool notify) : Command(Me, "WEBIRC", 0, 4, true), Hosts(Hosts), notify(notify) + CommandWebirc(InspIRCd* iMe, CGIHostlist &cHosts, bool bnotify) : Command(iMe, "WEBIRC", 0, 4, true), Hosts(cHosts), notify(bnotify) { this->source = "m_cgiirc.so"; this->syntax = "password client hostname ip"; @@ -97,8 +98,8 @@ class CGIResolver : public Resolver User* them; bool notify; public: - CGIResolver(Module* me, InspIRCd* ServerInstance, bool NotifyOpers, const std::string &source, bool forward, User* u, int userfd, const std::string &type, bool &cached) - : Resolver(ServerInstance, source, forward ? DNS_QUERY_A : DNS_QUERY_PTR4, cached, me), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { } + CGIResolver(Module* me, InspIRCd* Instance, bool NotifyOpers, const std::string &source, bool forward, User* u, int userfd, const std::string &type, bool &cached) + : Resolver(Instance, source, forward ? DNS_QUERY_A : DNS_QUERY_PTR4, cached, me), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { } virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0) { diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 0caa2d6f5..6bde81c67 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -209,8 +209,8 @@ class ModuleCustomTitle : public Module std::string* text; if (!dest->GetExt("ctitle", text)) { - std::string* text = new std::string(extdata); - dest->Extend("ctitle",text); + std::string* ntext = new std::string(extdata); + dest->Extend("ctitle",ntext); } } } diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 7ac1bc737..0ae5791cd 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -268,13 +268,13 @@ class ModuleDCCAllow : public Module virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) { - dccallowlist* dl; + dccallowlist* udl; // remove their DCCALLOW list if they have one - user->GetExt("dccallow_list", dl); - if (dl) + user->GetExt("dccallow_list", udl); + if (udl) { - delete dl; + delete udl; user->Shrink("dccallow_list"); RemoveFromUserlist(user); } @@ -389,17 +389,17 @@ class ModuleDCCAllow : public Module { if (dl->size()) { - dccallowlist::iterator iter = dl->begin(); - while (iter != dl->end()) + dccallowlist::iterator iter2 = dl->begin(); + while (iter2 != dl->end()) { - if ((iter->set_on + iter->length) <= ServerInstance->Time()) + if ((iter2->set_on + iter2->length) <= ServerInstance->Time()) { - u->WriteServ("997 %s %s :DCCALLOW entry for %s has expired", u->nick, u->nick, iter->nickname.c_str()); - iter = dl->erase(iter); + u->WriteServ("997 %s %s :DCCALLOW entry for %s has expired", u->nick, u->nick, iter2->nickname.c_str()); + iter2 = dl->erase(iter2); } else { - ++iter; + ++iter2; } } } diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index eff6e64a4..969aa8b5b 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -64,9 +64,9 @@ class ModuleDenyChannels : public Module std::string reason = Conf->ReadValue("badchan","reason",j); std::string redirect = Conf->ReadValue("badchan","redirect",j); - for (int j = 0; j < Conf->Enumerate("goodchan"); j++) + for (int i = 0; i < Conf->Enumerate("goodchan"); i++) { - if (match(cname, Conf->ReadValue("goodchan", "name", j).c_str())) + if (match(cname, Conf->ReadValue("goodchan", "name", i).c_str())) { return 0; } diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 40f5c2910..1c6939220 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -51,8 +51,8 @@ class DNSBLResolver : public Resolver public: - DNSBLResolver(Module *me, InspIRCd *ServerInstance, const std::string &hostname, User* u, int userfd, DNSBLConfEntry *conf, bool &cached) - : Resolver(ServerInstance, hostname, DNS_QUERY_A, cached, me) + DNSBLResolver(Module *me, InspIRCd *Instance, const std::string &hostname, User* u, int userfd, DNSBLConfEntry *conf, bool &cached) + : Resolver(Instance, hostname, DNS_QUERY_A, cached, me) { theirfd = userfd; them = u; @@ -220,7 +220,6 @@ class ModuleDNSBL : public Module */ void ClearEntries() { - std::vector<DNSBLConfEntry *>::iterator i; for (std::vector<DNSBLConfEntry *>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++) delete *i; DNSBLConfEntries.clear(); diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 32b80d283..2be2cfeca 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -36,13 +36,13 @@ class ModuleFilter : public FilterBase { } - virtual FilterResult* FilterMatch(User* user, const std::string &text, int flags) + virtual FilterResult* FilterMatch(User* user, const std::string &text, int iflags) { for (filter_t::iterator index = filters.begin(); index != filters.end(); index++) { /* Skip ones that dont apply to us */ - if (!FilterBase::AppliesToMe(user, index->second, flags)) + if (!FilterBase::AppliesToMe(user, index->second, iflags)) continue; if (ServerInstance->MatchText(text,index->first)) @@ -71,14 +71,14 @@ class ModuleFilter : public FilterBase return false; } - virtual std::pair<bool, std::string> AddFilter(const std::string &freeform, const std::string &type, const std::string &reason, long duration, const std::string &flags) + virtual std::pair<bool, std::string> AddFilter(const std::string &freeform, const std::string &type, const std::string &reason, long duration, const std::string &sflags) { if (filters.find(freeform) != filters.end()) { return std::make_pair(false, "Filter already exists"); } - FilterResult* x = new FilterResult(freeform, reason, type, duration, flags); + FilterResult* x = new FilterResult(freeform, reason, type, duration, sflags); filters[freeform] = x; return std::make_pair(true, ""); @@ -103,13 +103,13 @@ class ModuleFilter : public FilterBase std::string pattern = MyConf->ReadValue("keyword","pattern",index); std::string reason = MyConf->ReadValue("keyword","reason",index); std::string do_action = MyConf->ReadValue("keyword","action",index); - std::string flags = MyConf->ReadValue("keyword","flags",index); + std::string sflags = MyConf->ReadValue("keyword","flags",index); long gline_time = ServerInstance->Duration(MyConf->ReadValue("keyword","duration",index)); if (do_action.empty()) do_action = "none"; - if (flags.empty()) - flags = "*"; - FilterResult* x = new FilterResult(pattern, reason, do_action, gline_time, flags); + if (sflags.empty()) + sflags = "*"; + FilterResult* x = new FilterResult(pattern, reason, do_action, gline_time, sflags); filters[pattern] = x; } delete MyConf; diff --git a/src/modules/m_filter.h b/src/modules/m_filter.h index 5bc41b136..130509682 100644 --- a/src/modules/m_filter.h +++ b/src/modules/m_filter.h @@ -36,10 +36,10 @@ class FilterResult : public classbase bool flag_privmsg; bool flag_notice; - FilterResult(const std::string free, const std::string &rea, const std::string &act, long gt, const std::string &fla) : freeform(free), reason(rea), - action(act), gline_time(gt), flags(fla) + FilterResult(const std::string free, const std::string &rea, const std::string &act, long gt, const std::string &fla) : + freeform(free), reason(rea), action(act), gline_time(gt), flags(fla) { - this->FillFlags(flags); + this->FillFlags(fla); } int FillFlags(const std::string &fl) @@ -121,9 +121,9 @@ class CommandFilter : public Command { FilterBase* Base; public: - CommandFilter(FilterBase* f, InspIRCd* Me, const std::string &source) : Command(Me, "FILTER", 'o', 1), Base(f) + CommandFilter(FilterBase* f, InspIRCd* Me, const std::string &ssource) : Command(Me, "FILTER", 'o', 1), Base(f) { - this->source = source; + this->source = ssource; this->syntax = "<filter-definition> <type> <flags> [<gline-duration>] :<reason>"; } @@ -207,17 +207,17 @@ class CommandFilter : public Command } }; -bool FilterBase::AppliesToMe(User* user, FilterResult* filter, int flags) +bool FilterBase::AppliesToMe(User* user, FilterResult* filter, int iflags) { if ((filter->flag_no_opers) && IS_OPER(user)) return false; - if ((flags & FLAG_PRIVMSG) && (!filter->flag_privmsg)) + if ((iflags & FLAG_PRIVMSG) && (!filter->flag_privmsg)) return false; - if ((flags & FLAG_NOTICE) && (!filter->flag_notice)) + if ((iflags & FLAG_NOTICE) && (!filter->flag_notice)) return false; - if ((flags & FLAG_QUIT) && (!filter->flag_quit_message)) + if ((iflags & FLAG_QUIT) && (!filter->flag_quit_message)) return false; - if ((flags & FLAG_PART) && (!filter->flag_part_message)) + if ((iflags & FLAG_PART) && (!filter->flag_part_message)) return false; return true; } diff --git a/src/modules/m_hash.h b/src/modules/m_hash.h index 47176f26f..6351cf04f 100644 --- a/src/modules/m_hash.h +++ b/src/modules/m_hash.h @@ -135,7 +135,7 @@ class HashSumRequest : public HashRequest * @param Target A pointer to the hashing module * @param data The data to be hashed */ - HashSumRequest(Module* Me, Module* Target, const std::string &data) : HashRequest(Me, Target, data) + HashSumRequest(Module* Me, Module* Target, const std::string &sdata) : HashRequest(Me, Target, sdata) { } }; @@ -161,7 +161,7 @@ class HashKeyRequest : public HashRequest * @param data The new IV's. This should be an array of exactly four 32 bit values. * On 64-bit architectures, the upper 32 bits of the values will be discarded. */ - HashKeyRequest(Module* Me, Module* Target, unsigned int* data) : HashRequest(Me, Target, data) + HashKeyRequest(Module* Me, Module* Target, unsigned int* sdata) : HashRequest(Me, Target, sdata) { } }; @@ -187,7 +187,7 @@ class HashHexRequest : public HashRequest * @param data The hex sequence to use. This should contain exactly 16 ASCII characters, * terminated by a NULL char. */ - HashHexRequest(Module* Me, Module* Target, const char* data) : HashRequest(Me, Target, data) + HashHexRequest(Module* Me, Module* Target, const char* sdata) : HashRequest(Me, Target, sdata) { } }; diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 7623493c4..efae473d9 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -76,7 +76,7 @@ class HttpServerSocket : public BufferedSocket public: - HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0) + HttpServerSocket(InspIRCd* SI, std::string shost, int iport, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, shost, iport, listening, maxtime), index(index_page), postsize(0) { InternalState = HTTP_LISTEN; Timeout = NULL; @@ -407,9 +407,9 @@ class HttpServerSocket : public BufferedSocket } } - void Page(std::stringstream* n, int response, HTTPHeaders *headers) + void Page(std::stringstream* n, int response, HTTPHeaders *hheaders) { - SendHeaders(n->str().length(), response, *headers); + SendHeaders(n->str().length(), response, *hheaders); this->Write(n->str()); if (!keepalive) diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index d39910838..b88258368 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -61,10 +61,10 @@ class ModuleMD5 : public Module } while (--words); } - void MD5Init(MD5Context *ctx, unsigned int* key = NULL) + void MD5Init(MD5Context *ctx, unsigned int* ikey = NULL) { /* These are the defaults for md5 */ - if (!key) + if (!ikey) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; @@ -73,10 +73,10 @@ class ModuleMD5 : public Module } else { - ctx->buf[0] = key[0]; - ctx->buf[1] = key[1]; - ctx->buf[2] = key[2]; - ctx->buf[3] = key[3]; + ctx->buf[0] = ikey[0]; + ctx->buf[1] = ikey[1]; + ctx->buf[2] = ikey[2]; + ctx->buf[3] = ikey[3]; } ctx->bytes[0] = 0; @@ -236,20 +236,20 @@ class ModuleMD5 : public Module } - void MyMD5(void *dest, void *orig, int len, unsigned int* key) + void MyMD5(void *dest, void *orig, int len, unsigned int* ikey) { MD5Context context; - MD5Init(&context, key); + MD5Init(&context, ikey); MD5Update(&context, (const unsigned char*)orig, len); MD5Final((unsigned char*)dest, &context); } - void GenHash(const char* src, char* dest, const char* xtab, unsigned int* key) + void GenHash(const char* src, char* dest, const char* xtab, unsigned int* ikey) { unsigned char bytes[16]; - MyMD5((char*)bytes, (void*)src, strlen(src), key); + MyMD5((char*)bytes, (void*)src, strlen(src), ikey); for (int i = 0; i < 16; i++) { diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 5e994e3fd..83b0888da 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -30,20 +30,20 @@ class CommandNicklock : public Command CmdResult Handle(const char** parameters, int pcnt, User *user) { - User* source = ServerInstance->FindNick(parameters[0]); + User* target = ServerInstance->FindNick(parameters[0]); irc::string server; irc::string me; // check user exists - if (!source) + if (!target) { return CMD_FAILURE; } // check if user is locked - if (source->GetExt("nick_locked", dummy)) + if (target->GetExt("nick_locked", dummy)) { - user->WriteServ("946 %s %s :This user's nickname is already locked.",user->nick,source->nick); + user->WriteServ("946 %s %s :This user's nickname is already locked.",user->nick,target->nick); return CMD_FAILURE; } @@ -56,14 +56,14 @@ class CommandNicklock : public Command // let others know ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used NICKLOCK to change and hold "+parameters[0]+" to "+parameters[1]); - if (!source->ForceNickChange(parameters[1])) + if (!target->ForceNickChange(parameters[1])) { // ugh, nickchange failed for some reason -- possibly existing nick? - User::QuitUser(ServerInstance, source, "Nickname collision"); + User::QuitUser(ServerInstance, target, "Nickname collision"); } // give them a lock flag - source->Extend("nick_locked", "ON"); + target->Extend("nick_locked", "ON"); /* route */ return CMD_SUCCESS; @@ -83,11 +83,11 @@ class CommandNickunlock : public Command CmdResult Handle (const char** parameters, int pcnt, User *user) { - User* source = ServerInstance->FindNick(parameters[0]); - if (source) + User* target = ServerInstance->FindNick(parameters[0]); + if (target) { - source->Shrink("nick_locked"); - user->WriteServ("945 %s %s :Nickname now unlocked.",user->nick,source->nick); + target->Shrink("nick_locked"); + user->WriteServ("945 %s %s :Nickname now unlocked.",user->nick,target->nick); ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used NICKUNLOCK on "+parameters[0]); return CMD_SUCCESS; } diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index baf73e113..66b917e18 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -121,9 +121,9 @@ class ModuleOperHash : public Module if (ServerInstance->Modules->ModuleHasInterface(mod, "HashRequest")) { ServerInstance->Log(DEBUG, "Post-load registering hasher: %s", name.c_str()); - std::string name = HashNameRequest(this, mod).Send(); - hashers[name.c_str()] = mod; - names.push_back(name); + std::string sname = HashNameRequest(this, mod).Send(); + hashers[sname.c_str()] = mod; + names.push_back(sname); if (!diduseiface) { ServerInstance->Modules->UseInterface("HashRequest"); diff --git a/src/modules/m_proxyscan.cpp b/src/modules/m_proxyscan.cpp index af47a1d57..328b92612 100644 --- a/src/modules/m_proxyscan.cpp +++ b/src/modules/m_proxyscan.cpp @@ -76,12 +76,12 @@ class ProxySocket : public EventHandler int rlen; bool done; public: - ProxySocket(InspIRCd *Server, User* u, const std::string &bindip, int port, char *cstr, int clen, char *rstr, int rlen) + ProxySocket(InspIRCd *Server, User* u, const std::string &bindip, int port, char *cstr, int mclen, char *rstr, int mrlen) { user = u; ServerInstance = Server; - this->clen = clen; - this->rlen = rlen; + this->clen = mclen; + this->rlen = mrlen; int i; |