diff options
Diffstat (limited to 'modules')
27 files changed, 73 insertions, 76 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 2fc245690..2fba96a9a 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -666,7 +666,7 @@ class CommandCSLevels : public Command { const Anope::string &what = params[2]; - /* Don't allow disabling of the founder level. It would be hard to change it back if you dont have access to use this command */ + /* Don't allow disabling of the founder level. It would be hard to change it back if you don't have access to use this command */ if (what.equals_ci("FOUNDER")) { source.Reply(_("You can not disable the founder privilege because it would be impossible to reenable it at a later time.")); diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index de6a4f40e..2fd5cb8d1 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -118,7 +118,7 @@ class CommandCSBan : public Command if (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access && !source.HasPriv("chanserv/kick")) source.Reply(ACCESS_DENIED); /* - * Dont ban/kick the user on channels where he is excepted + * Don't ban/kick the user on channels where he is excepted * to prevent services <-> server wars. */ else if (c->MatchesList(u2, "EXCEPT")) diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index b11bc8862..86eaf1619 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -44,10 +44,11 @@ struct ModeLocksImpl : ModeLocks ~ModeLocksImpl() { - for (ModeList::iterator it = this->mlocks->begin(); it != this->mlocks->end();) + ModeList modelist; + mlocks->swap(modelist); + for (ModeList::iterator it = modelist.begin(); it != modelist.end(); ++it) { ModeLock *ml = *it; - ++it; delete ml; } } @@ -921,7 +922,7 @@ class CSMode : public Module } else if (cm->type == MODE_PARAM) { - /* If the channel doesnt have the mode, or it does and it isn't set correctly */ + /* If the channel doesn't have the mode, or it does and it isn't set correctly */ if (ml->set) { Anope::string param; diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index cfff16377..106adf507 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -616,7 +616,7 @@ class CommandCSSetPersist : public Command " \n" "If your IRCd has a permanent (persistent) channel mode\n" "and it is set or unset (for any reason, including MODE LOCK),\n" - "persist is automatically set and unset for the channel aswell.\n" + "persist is automatically set and unset for the channel as well.\n" "Additionally, services will set or unset this mode when you\n" "set persist on or off."), BotServ ? BotServ->nick.c_str() : "BotServ", ChanServ ? ChanServ->nick.c_str() : "ChanServ"); @@ -870,8 +870,8 @@ class CommandCSSetSecureOps : public Command this->SendSyntax(source); source.Reply(" "); source.Reply(_("Enables or disables the \002secure ops\002 option for a channel.\n" - "When \002secure ops\002 is set, users who are not on the userlist\n" - "will not be allowed chanop status.")); + "When \002secure ops\002 is set, users who are not on the access list\n" + "will not be allowed channel operator status.")); return true; } }; diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index 4524a9831..96cab5b5f 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -124,7 +124,7 @@ class CommandCSUp : public Command this->SendSyntax(source); source.Reply(" "); source.Reply(_("Updates a selected nicks status modes on a channel. If \037nick\037 is\n" - "ommited then your status is updated. If \037channel\037 is ommited then\n" + "omitted then your status is updated. If \037channel\037 is omitted then\n" "your channel status is updated on every channel you are in.")); return true; } @@ -221,7 +221,7 @@ class CommandCSDown : public Command this->SendSyntax(source); source.Reply(" "); source.Reply(_("Removes a selected nicks status modes on a channel. If \037nick\037 is\n" - "ommited then your status is removed. If \037channel\037 is ommited then\n" + "omitted then your status is removed. If \037channel\037 is omitted then\n" "your channel status is removed on every channel you are in.")); return true; } diff --git a/modules/commands/ms_check.cpp b/modules/commands/ms_check.cpp index 6fab8919a..f789d785d 100644 --- a/modules/commands/ms_check.cpp +++ b/modules/commands/ms_check.cpp @@ -36,7 +36,7 @@ class CommandMSCheck : public Command MemoInfo *mi = &na->nc->memos; - /* Okay, I know this looks strange but we wanna get the LAST memo, so we + /* Okay, I know this looks strange but we want to get the LAST memo, so we have to loop backwards */ for (unsigned i = mi->memos->size(); i > 0; --i) diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp index 82a3831ff..8dab9200e 100644 --- a/modules/commands/ms_read.cpp +++ b/modules/commands/ms_read.cpp @@ -30,14 +30,14 @@ static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Ano if (!nc) return; - /* Text of the memo varies if the recepient was a + /* Text of the memo varies if the recipient was a nick or channel */ Anope::string text = Anope::printf(Language::Translate(na->nc, _("\002[auto-memo]\002 The memo you sent to %s has been viewed.")), targ.c_str()); /* Send notification */ MemoServService->Send(source.GetNick(), m->sender, text, true); - /* Notify recepient of the memo that a notification has + /* Notify recipient of the memo that a notification has been sent to the sender */ source.Reply(_("A notification memo has been sent to %s informing him/her you have\n" "read his/her memo."), nc->display.c_str()); diff --git a/modules/commands/ms_set.cpp b/modules/commands/ms_set.cpp index c3394f14d..63ffe383a 100644 --- a/modules/commands/ms_set.cpp +++ b/modules/commands/ms_set.cpp @@ -254,7 +254,7 @@ class CommandMSSet : public Command " on or when you unset /AWAY.\n" " NEW You will only be notified of memos when they\n" " are sent to you.\n" - " MAIL You will be notified of memos by email aswell as\n" + " MAIL You will be notified of memos by email as well as\n" " any other settings you have.\n" " NOMAIL You will not be notified of memos by email.\n" " OFF You will not receive any notification of memos.\n" diff --git a/modules/commands/ns_logout.cpp b/modules/commands/ns_logout.cpp index d8f7b2486..2ddff2185 100644 --- a/modules/commands/ns_logout.cpp +++ b/modules/commands/ns_logout.cpp @@ -40,7 +40,7 @@ class CommandNSLogout : public Command if (!nick.empty() && !param.empty() && param.equals_ci("REVALIDATE") && NickServService) NickServService->Validate(u2); - u2->super_admin = false; /* Dont let people logout and remain a SuperAdmin */ + u2->super_admin = false; /* Don't let people logout and remain a SuperAdmin */ Log(LOG_COMMAND, source, this) << "to logout " << u2->nick; /* Remove founder status from this user in all channels */ diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index e8e7c335c..589529d61 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -1107,13 +1107,13 @@ class CommandNSSASetNoexpire : public Command if (param.equals_ci("ON")) { - Log(LOG_ADMIN, source, this) << "to enable noexpire for " << na->nc->display; + Log(LOG_ADMIN, source, this) << "to enable noexpire for " << na->nick << " (" << na->nc->display << ")"; na->Extend<bool>("NS_NO_EXPIRE"); source.Reply(_("Nick %s \002will not\002 expire."), na->nick.c_str()); } else if (param.equals_ci("OFF")) { - Log(LOG_ADMIN, source, this) << "to disable noexpire for " << na->nc->display; + Log(LOG_ADMIN, source, this) << "to disable noexpire for " << na->nick << " (" << na->nc->display << ")"; na->Shrink<bool>("NS_NO_EXPIRE"); source.Reply(_("Nick %s \002will\002 expire."), na->nick.c_str()); } diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index 27b2e4fe9..2d33931a5 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -687,7 +687,7 @@ static void LoadVHosts() NickAlias *na = NickAlias::Find(nick); if (na == NULL) { - Log() << "Removing vhost for nonexistant nick " << nick; + Log() << "Removing vhost for non-existent nick " << nick; continue; } diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp index 3cd023ed6..66677e6a8 100644 --- a/modules/database/db_redis.cpp +++ b/modules/database/db_redis.cpp @@ -139,7 +139,7 @@ class DatabaseRedis : public Module, public Pipe { Serialize::Type *t = obj->GetSerializableType(); - /* If there is no id yet for ths object, get one */ + /* If there is no id yet for this object, get one */ if (!obj->id) redis->SendCommand(new IDInterface(this, obj), "INCR id:" + t->GetName()); else diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index ff63be5c6..ed26b87f1 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -137,10 +137,8 @@ class LDAPModify : public LDAPRequest class LDAPService : public LDAPProvider, public Thread, public Condition { Anope::string server; - int port; Anope::string admin_binddn; Anope::string admin_pass; - time_t timeout; LDAP *con; @@ -187,6 +185,23 @@ class LDAPService : public LDAPProvider, public Thread, public Condition } private: + void Connect() + { + int i = ldap_initialize(&this->con, this->server.c_str()); + if (i != LDAP_SUCCESS) + throw LDAPException("Unable to connect to LDAP service " + this->name + ": " + ldap_err2string(i)); + + const int version = LDAP_VERSION3; + i = ldap_set_option(this->con, LDAP_OPT_PROTOCOL_VERSION, &version); + if (i != LDAP_OPT_SUCCESS) + throw LDAPException("Unable to set protocol version for " + this->name + ": " + ldap_err2string(i)); + + const struct timeval tv = { 0, 0 }; + i = ldap_set_option(this->con, LDAP_OPT_NETWORK_TIMEOUT, &tv); + if (i != LDAP_OPT_SUCCESS) + throw LDAPException("Unable to set timeout for " + this->name + ": " + ldap_err2string(i)); + } + void Reconnect() { /* Only try one connect a minute. It is an expensive blocking operation */ @@ -195,9 +210,8 @@ class LDAPService : public LDAPProvider, public Thread, public Condition last_connect = Anope::CurTime; ldap_unbind_ext(this->con, NULL, NULL); - int i = ldap_initialize(&this->con, this->server.c_str()); - if (i != LDAP_SUCCESS) - throw LDAPException("Unable to connect to LDAP service " + this->name + ": " + ldap_err2string(i)); + + Connect(); } void QueueRequest(LDAPRequest *r) @@ -213,21 +227,9 @@ class LDAPService : public LDAPProvider, public Thread, public Condition query_queue queries, results; Mutex process_mutex; /* held when processing requests not in either queue */ - LDAPService(Module *o, const Anope::string &n, const Anope::string &s, int po, const Anope::string &b, const Anope::string &p, time_t t) : LDAPProvider(o, n), server(s), port(po), admin_binddn(b), admin_pass(p), timeout(t), last_connect(0) + LDAPService(Module *o, const Anope::string &n, const Anope::string &s, const Anope::string &b, const Anope::string &p) : LDAPProvider(o, n), server(s), admin_binddn(b), admin_pass(p), last_connect(0) { - int i = ldap_initialize(&this->con, this->server.c_str()); - if (i != LDAP_SUCCESS) - throw LDAPException("Unable to connect to LDAP service " + this->name + ": " + ldap_err2string(i)); - - const int version = LDAP_VERSION3; - i = ldap_set_option(this->con, LDAP_OPT_PROTOCOL_VERSION, &version); - if (i != LDAP_OPT_SUCCESS) - throw LDAPException("Unable to set protocol version for " + this->name + ": " + ldap_err2string(i)); - - const struct timeval tv = { 0, 0 }; - i = ldap_set_option(this->con, LDAP_OPT_NETWORK_TIMEOUT, &tv); - if (i != LDAP_OPT_SUCCESS) - throw LDAPException("Unable to set timeout for " + this->name + ": " + ldap_err2string(i)); + Connect(); } ~LDAPService() @@ -487,14 +489,12 @@ class ModuleLDAP : public Module, public Pipe if (this->LDAPServices.find(connname) == this->LDAPServices.end()) { const Anope::string &server = ldap->Get<const Anope::string>("server", "127.0.0.1"); - int port = ldap->Get<int>("port", "389"); const Anope::string &admin_binddn = ldap->Get<const Anope::string>("admin_binddn"); const Anope::string &admin_password = ldap->Get<const Anope::string>("admin_password"); - time_t timeout = ldap->Get<time_t>("timeout", "5"); try { - LDAPService *ss = new LDAPService(this, connname, server, port, admin_binddn, admin_password, timeout); + LDAPService *ss = new LDAPService(this, connname, server, admin_binddn, admin_password); ss->Start(); this->LDAPServices.insert(std::make_pair(connname, ss)); diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 27b1b3eae..e21b3641d 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -424,7 +424,7 @@ class MChanstats : public Module "END;"; this->RunQuery(query); - /* dont prepend any database prefix to events so we can always delete/change old events */ + /* don't prepend any database prefix to events so we can always delete/change old events */ if (this->HasEvent("chanstats_event_cleanup_daily")) { query = "DROP EVENT chanstats_event_cleanup_daily"; diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 1bda6c106..c95f6f785 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -149,7 +149,7 @@ class Fantasy : public Module ServiceReference<Command> cmd("Command", info.name); if (!cmd) { - Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for nonexistant service " << info.name << "!"; + Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for non-existent service " << info.name << "!"; return; } diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index dfa2cc969..e6ee8cee1 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -22,7 +22,7 @@ namespace time_t timeout; } -/** A full packet sent or recieved to/from the nameserver +/** A full packet sent or received to/from the nameserver */ class Packet : public Query { @@ -804,7 +804,7 @@ class MyManager : public Manager, public Timer } Packet *packet = new Packet(recv_packet); - packet->flags |= QUERYFLAGS_QR; /* This is a reponse */ + packet->flags |= QUERYFLAGS_QR; /* This is a response */ packet->flags |= QUERYFLAGS_AA; /* And we are authoritative */ packet->answers.clear(); diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 4e193da01..9fa7e94e9 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -373,7 +373,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[6]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistant server " << params[6] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[6] << "?"; return; } @@ -444,7 +444,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for nonexistant user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 0801b58f4..9409c320f 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -229,7 +229,7 @@ struct IRCDMessageEUID : IRCDMessage } }; -// we cant use this function from ratbox because we set a local variable here +// we can't use this function from ratbox because we set a local variable here struct IRCDMessageServer : IRCDMessage { IRCDMessageServer(Module *creator) : IRCDMessage(creator, "SERVER", 3) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } @@ -245,7 +245,7 @@ struct IRCDMessageServer : IRCDMessage } }; -// we cant use this function from ratbox because we set a local variable here +// we can't use this function from ratbox because we set a local variable here struct IRCDMessagePass : IRCDMessage { IRCDMessagePass(Module *creator) : IRCDMessage(creator, "PASS", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); } diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index 150886232..ba46476d9 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -460,7 +460,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for nonexistant user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 7f080b1d0..e3c61a442 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -949,7 +949,7 @@ struct IRCDMessageFJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "FJOIN for nonexistant user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "FJOIN for non-existent user " << buf << " on " << params[0]; continue; } @@ -1175,7 +1175,7 @@ struct IRCDMessageOperType : IRCDMessage void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { /* opertype is equivalent to mode +o because servers - dont do this directly */ + don't do this directly */ User *u = source.GetUser(); if (!u->HasMode("OPER")) u->SetModesInternal(source, "+o"); @@ -1371,7 +1371,7 @@ class ProtoInspIRCd12 : public Module /* InspIRCd 1.2 doesn't set -r on nick change, remove -r here. Note that if we have to set +r later * this will cancel out this -r, resulting in no mode changes. * - * Do not set -r if we dont have a NickServ loaded - DP + * Do not set -r if we don't have a NickServ loaded - DP */ BotInfo *NickServ = Config->GetClient("NickServ"); if (NickServ) diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index d95f09591..be17818a4 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -1055,15 +1055,6 @@ class ProtoInspIRCd20 : public Module return EVENT_CONTINUE; } - - EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override - { - if ((setter.GetUser() && setter.GetUser()->server == Me) || setter.GetServer() == Me || !setter.GetServer()) - if (mode->name == "OPERPREFIX") - c->SetMode(c->ci->WhoSends(), mode, param, false); - - return EVENT_CONTINUE; - } }; MODULE_INIT(ProtoInspIRCd20) diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 28f68007b..4ea9a15ec 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -451,7 +451,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[4]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistant server " << params[4] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[4] << "?"; return; } User::OnIntroduce(params[0], params[2], params[3], "", "", s, params[6], Anope::CurTime, params[5], "", NULL); @@ -500,7 +500,7 @@ struct IRCDMessageNJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "NJOIN for nonexistant user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "NJOIN for non-existent user " << buf << " on " << params[0]; continue; } users.push_back(sju); @@ -587,7 +587,7 @@ struct IRCDMessageTopic : IRCDMessage Channel *c = Channel::Find(params[0]); if (!c) { - Log(LOG_DEBUG) << "TOPIC for nonexistant channel " << params[0]; + Log(LOG_DEBUG) << "TOPIC for non-existent channel " << params[0]; return; } c->ChangeTopicInternal(source.GetUser(), source.GetName(), params[1], Anope::CurTime); diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 8ccabd604..da033d3f5 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -172,7 +172,7 @@ struct IRCDMessageTBurst : IRCDMessage * params[0] = channel * params[1] = ts * params[2] = topic OR who set the topic - * params[3] = topic if params[2] isnt the topic + * params[3] = topic if params[2] isn't the topic */ void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index ef8393b74..dccfdc91b 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -576,7 +576,7 @@ class ChannelModeFlood : public ChannelModeParam while (p < arg.length() && isdigit(arg[p])) ++p; if (p == arg.length() || !(arg[p] == 'c' || arg[p] == 'j' || arg[p] == 'k' || arg[p] == 'm' || arg[p] == 'n' || arg[p] == 't')) - continue; /* continue instead of break for forward compatability. */ + continue; /* continue instead of break for forward compatibility. */ try { int v = arg.substr(0, p).is_number_only() ? convertTo<int>(arg.substr(0, p)) : 0; @@ -908,7 +908,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[5]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistant server " << params[5] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[5] << "?"; return; } @@ -992,7 +992,7 @@ struct IRCDMessageSetHost : IRCDMessage { User *u = source.GetUser(); - /* When a user sets +x we recieve the new host and then the mode change */ + /* When a user sets +x we receive the new host and then the mode change */ if (u->HasMode("CLOAK")) u->SetDisplayedHost(params[0]); else @@ -1096,7 +1096,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for nonexistant user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; continue; } diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index 55c57b974..2d32eb502 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -90,7 +90,7 @@ class BotServCore : public Module { /** * We let the bot join even if it was an ignored user, as if we don't, - * and the ignored user doesnt just leave, the bot will never + * and the ignored user doesn't just leave, the bot will never * make it into the channel, leaving the channel botless even for * legit users - Rob **/ @@ -109,7 +109,7 @@ class BotServCore : public Module if (c->ci && persist && persist->HasExt(c->ci)) return; - /* Channel is syncing from a netburst, don't destroy it as more users are probably wanting to join immediatly + /* Channel is syncing from a netburst, don't destroy it as more users are probably wanting to join immediately * We also don't part the bot here either, if necessary we will part it after the sync */ if (c->syncing) diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index c51a15360..ee1049195 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -39,6 +39,11 @@ class NickServCollide : public Timer return u; } + NickAlias *GetNick() + { + return na; + } + void Tick(time_t t) anope_override { if (!u || !na) @@ -361,7 +366,7 @@ class NickServCore : public Module, public NickServService for (std::set<NickServCollide *>::iterator it = collides.begin(); it != collides.end(); ++it) { NickServCollide *c = *it; - if (c->GetUser() == u) + if (c->GetUser() == u && c->GetNick() && c->GetNick()->nc == u->Account()) { delete c; break; diff --git a/modules/webcpanel/pages/memoserv/memos.cpp b/modules/webcpanel/pages/memoserv/memos.cpp index 944864cdd..750b6bd8b 100644 --- a/modules/webcpanel/pages/memoserv/memos.cpp +++ b/modules/webcpanel/pages/memoserv/memos.cpp @@ -41,15 +41,15 @@ bool WebCPanel::MemoServ::Memos::OnRequest(HTTPProvider *server, const Anope::st { replacements["MESSAGES"] = "Displaying the memos for " + chname + "."; mi = &ci->memos; + + replacements["CHANNEL_NAME"] = ci->name; + replacements["ESCAPED_CHANNEL_NAME"] = HTTPUtils::URLEncode(ci->name); } else { replacements["MESSAGES"] = "Channel " + chname + " not found, displaying the memos for your nick"; mi = &na->nc->memos; } - - replacements["CHANNEL_NAME"] = ci->name; - replacements["ESCAPED_CHANNEL_NAME"] = HTTPUtils::URLEncode(ci->name); } if (message.post_data.count("receiver") > 0 && message.post_data.count("message") > 0) { |