From cfb2c2fff47d99f43434de7db339c2f2237c6bad Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Aug 2006 16:14:44 +0000 Subject: CamelCaseRocksSoMuchICamelCasedAllTheMethodsOfClassInspIRCdSoThatItAllLooksNeat. NowSomebodyHasToSpendHoursDocumentingAllOfThisIWonderWhoThatWillEndUpBeing... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4889 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_alias.cpp | 2 +- src/modules/m_banexception.cpp | 2 +- src/modules/m_blockcaps.cpp | 2 +- src/modules/m_blockcolor.cpp | 2 +- src/modules/m_cban.cpp | 2 +- src/modules/m_censor.cpp | 2 +- src/modules/m_chanfilter.cpp | 2 +- src/modules/m_chanprotect.cpp | 8 +++---- src/modules/m_chghost.cpp | 2 +- src/modules/m_inviteexception.cpp | 2 +- src/modules/m_joinflood.cpp | 2 +- src/modules/m_kicknorejoin.cpp | 2 +- src/modules/m_knock.cpp | 2 +- src/modules/m_messageflood.cpp | 2 +- src/modules/m_noctcp.cpp | 2 +- src/modules/m_noinvite.cpp | 2 +- src/modules/m_nokicks.cpp | 4 ++-- src/modules/m_nonicks.cpp | 2 +- src/modules/m_nonotice.cpp | 4 ++-- src/modules/m_operchans.cpp | 2 +- src/modules/m_redirect.cpp | 2 +- src/modules/m_remove.cpp | 4 ++-- src/modules/m_sajoin.cpp | 2 +- src/modules/m_sanick.cpp | 2 +- src/modules/m_sapart.cpp | 2 +- src/modules/m_saquit.cpp | 2 +- src/modules/m_services.cpp | 12 +++++------ src/modules/m_services_account.cpp | 8 +++---- src/modules/m_spanningtree.cpp | 44 +++++++++++++++++++------------------- src/modules/m_sslmodes.cpp | 2 +- src/modules/m_stripcolor.cpp | 2 +- src/modules/m_swhois.cpp | 4 ++-- src/modules/m_timedbans.cpp | 6 +++--- 33 files changed, 71 insertions(+), 71 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 7b29cc9f9..5eb7c9908 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -116,7 +116,7 @@ class ModuleAlias : public Module } if ((u != NULL) && (Aliases[i].requires != "") && (Aliases[i].uline)) { - if (!ServerInstance->is_uline(u->server)) + if (!ServerInstance->ULine(u->server)) { ServerInstance->WriteOpers("*** NOTICE -- Service "+Aliases[i].requires+" required by alias "+std::string(Aliases[i].text.c_str())+" is not on a u-lined server, possibly underhanded antics detected!"); user->WriteServ("401 "+std::string(user->nick)+" "+Aliases[i].requires+" :is an imposter! Please inform an IRC operator as soon as possible."); diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 36021a6a4..cc3bf0730 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -49,7 +49,7 @@ public: virtual void On005Numeric(std::string &output) { output.append(" EXCEPTS=e"); - ServerInstance->ModeGrok->InsertMode(output, "e", 1); + ServerInstance->Modes->InsertMode(output, "e", 1); } virtual int OnCheckBan(userrec* user, chanrec* chan) diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 655643ed8..1e9095a83 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -74,7 +74,7 @@ public: virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "P", 4); + ServerInstance->Modes->InsertMode(output, "P", 4); } virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index ddba6ee2a..04d9d1e54 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -76,7 +76,7 @@ class ModuleBlockColour : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"c",4); + ServerInstance->Modes->InsertMode(output,"c",4); } virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index cf2be71d1..19d6e8502 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -92,7 +92,7 @@ class cmd_cban : public command_t // parameters[0] = #channel // parameters[1] = 1h3m2s // parameters[2] = Tortoise abuser - long length = ServerInstance->duration(parameters[1]); + long length = ServerInstance->Duration(parameters[1]); std::string reason = (pcnt > 2) ? parameters[2] : "No reason supplied"; cbans.push_back(CBan(parameters[0], user->nick, ServerInstance->Time(), length, reason)); diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index d227a2347..e68886a34 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -139,7 +139,7 @@ class ModuleCensor : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"G",4); + ServerInstance->Modes->InsertMode(output,"G",4); } virtual ~ModuleCensor() diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 138df4aa9..c835da180 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -86,7 +86,7 @@ class ModuleChanFilter : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"g",1); + ServerInstance->Modes->InsertMode(output,"g",1); } virtual void OnChannelDelete(chanrec* chan) diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 68a4afb9f..13a9957cb 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -85,7 +85,7 @@ class ChanFounder : public ModeHandler std::string founder = "cm_founder_"+std::string(channel->name); // source is a server, or ulined, we'll let them +-q the user. - if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server) || (!IS_LOCAL(source))) + if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server) || (!IS_LOCAL(source))) { ServerInstance->Log(DEBUG,"Allowing remote mode change in ChanFounder"); if (adding) @@ -194,7 +194,7 @@ class ChanProtect : public ModeHandler std::string founder = "cm_founder_"+std::string(channel->name); // source has +q, is a server, or ulined, we'll let them +-a the user. - if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server) || (source->GetExt(founder,dummyptr)) || (!IS_LOCAL(source))) + if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server) || (source->GetExt(founder,dummyptr)) || (!IS_LOCAL(source))) { if (adding) { @@ -273,7 +273,7 @@ class ModuleChanProtect : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"qa",1); + ServerInstance->Modes->InsertMode(output,"qa",1); } virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason) @@ -343,7 +343,7 @@ class ModuleChanProtect : public Module // firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode // without any access checks, we're not worthy :p - if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server)) + if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server)) { return ACR_ALLOW; } diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index ac16f137e..d3c3dc84f 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -60,7 +60,7 @@ class cmd_chghost : public command_t userrec* dest = ServerInstance->FindNick(parameters[0]); if (dest) { - if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->is_uline(user->server))) + if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->ULine(user->server))) { // fix by brain - ulines set hosts silently ServerInstance->WriteOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+parameters[1]); diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index f9f3c63af..0f2748b0a 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -48,7 +48,7 @@ public: virtual void On005Numeric(std::string &output) { output.append(" INVEX=I"); - ServerInstance->ModeGrok->InsertMode(output, "I", 1); + ServerInstance->Modes->InsertMode(output, "I", 1); } virtual int OnCheckInvite(userrec* user, chanrec* chan) diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 9a49cf6b1..e4d528159 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -245,7 +245,7 @@ class ModuleJoinFlood : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "j", 3); + ServerInstance->Modes->InsertMode(output, "j", 3); } virtual ~ModuleJoinFlood() diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 12b09ea30..86f53fae7 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -168,7 +168,7 @@ public: virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "J", 3); + ServerInstance->Modes->InsertMode(output, "J", 3); } virtual ~ModuleKickNoRejoin() diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index afc3cfa02..25286f4c5 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -125,7 +125,7 @@ class ModuleKnock : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"K",4); + ServerInstance->Modes->InsertMode(output,"K",4); } virtual ~ModuleKnock() diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 0f2bb23c6..ce10daed2 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -265,7 +265,7 @@ class ModuleMsgFlood : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "f", 3); + ServerInstance->Modes->InsertMode(output, "f", 3); } virtual ~ModuleMsgFlood() diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index a01862f70..666143a04 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -77,7 +77,7 @@ class ModuleNoCTCP : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"C",4); + ServerInstance->Modes->InsertMode(output,"C",4); } virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index 860ec17d2..b2878830e 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -76,7 +76,7 @@ class ModuleNoInvite : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"V",4); + ServerInstance->Modes->InsertMode(output,"V",4); } diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 656e5d0a8..1606ca026 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -77,7 +77,7 @@ class ModuleNoKicks : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"Q",4); + ServerInstance->Modes->InsertMode(output,"Q",4); } virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) @@ -86,7 +86,7 @@ class ModuleNoKicks : public Module { if (channel->IsModeSet('Q')) { - if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server)) + if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server)) { // ulines can still kick with +Q in place return ACR_ALLOW; diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index ff99f8eed..d8f974c9f 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -89,7 +89,7 @@ class ModuleNoNickChange : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"N",4); + ServerInstance->Modes->InsertMode(output,"N",4); } virtual int OnUserPreNick(userrec* user, const std::string &newnick) diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 6f37640c2..1c0948f12 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -81,7 +81,7 @@ class ModuleNoNotice : public Module chanrec* c = (chanrec*)dest; if (c->IsModeSet('T')) { - if ((ServerInstance->is_uline(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP)) + if ((ServerInstance->ULine(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP)) { // ops and halfops can still /NOTICE the channel return 0; @@ -98,7 +98,7 @@ class ModuleNoNotice : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"T",4); + ServerInstance->Modes->InsertMode(output,"T",4); } virtual ~ModuleNoNotice() diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 3adff3c6b..def8452b4 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -76,7 +76,7 @@ class ModuleOperChans : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"O",4); + ServerInstance->Modes->InsertMode(output,"O",4); } virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 7d887e100..4f9aa0c2a 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -125,7 +125,7 @@ class ModuleRedirect : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "L", 3); + ServerInstance->Modes->InsertMode(output, "L", 3); } virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 18bddd015..8e26f6ead 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -109,7 +109,7 @@ class RemoveBase protectkey = "cm_protect_" + std::string(channel->name); founderkey = "cm_founder_" + std::string(channel->name); - if (ServerInstance->is_uline(user->server) || ServerInstance->is_uline(user->nick)) + if (ServerInstance->ULine(user->server) || ServerInstance->ULine(user->nick)) { ServerInstance->Log(DEBUG, "Setting ulevel to U"); ulevel = chartolevel("U"); @@ -131,7 +131,7 @@ class RemoveBase } /* Now it's the same idea, except for the target. If they're ulined make sure they get a higher level than the sender can */ - if (ServerInstance->is_uline(target->server) || ServerInstance->is_uline(target->nick)) + if (ServerInstance->ULine(target->server) || ServerInstance->ULine(target->nick)) { ServerInstance->Log(DEBUG, "Setting tlevel to U"); tlevel = chartolevel("U"); diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 0d998abd9..3dfbc7efe 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -43,7 +43,7 @@ class cmd_sajoin : public command_t userrec* dest = ServerInstance->FindNick(parameters[0]); if (dest) { - if (ServerInstance->is_uline(dest->server)) + if (ServerInstance->ULine(dest->server)) { user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick); return; diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 5758bac64..818672ce4 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -42,7 +42,7 @@ class cmd_sanick : public command_t userrec* source = ServerInstance->FindNick(parameters[0]); if (source) { - if (ServerInstance->is_uline(source->server)) + if (ServerInstance->ULine(source->server)) { user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick); return; diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 9d20ed638..3120783cf 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -44,7 +44,7 @@ class cmd_sapart : public command_t chanrec* channel = ServerInstance->FindChan(parameters[1]); if (dest && channel) { - if (ServerInstance->is_uline(dest->server)) + if (ServerInstance->ULine(dest->server)) { user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick); return; diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 0a6155b27..1152a2ea2 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -52,7 +52,7 @@ class cmd_saquit : public command_t userrec* dest = ServerInstance->FindNick(parameters[0]); if (dest) { - if (ServerInstance->is_uline(dest->server)) + if (ServerInstance->ULine(dest->server)) { user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick); return; diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index 40e160a6c..21ab31f6b 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -41,7 +41,7 @@ class Channel_r : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { // only a u-lined server may add or remove the +r mode. - if ((ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.')))) + if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.')))) { ServerInstance->Log(DEBUG,"Allowing cmode +r, server and nick are: '%s','%s'",source->nick,source->server); channel->SetMode('r',adding); @@ -64,7 +64,7 @@ class User_r : public ModeHandler ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { - if ((kludgeme) || (ServerInstance->is_uline(source->nick)) || (ServerInstance->is_uline(source->server)) || (!*source->server || (strchr(source->nick,'.')))) + if ((kludgeme) || (ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.')))) { ServerInstance->Log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",source->nick,source->server); dest->SetMode('r',adding); @@ -191,7 +191,7 @@ class ModuleServices : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "rRM", 4); + ServerInstance->Modes->InsertMode(output, "rRM", 4); } /* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */ @@ -230,7 +230,7 @@ class ModuleServices : public Module chanrec* c = (chanrec*)dest; if ((c->IsModeSet('M')) && (!user->IsModeSet('r'))) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)) || (!strcmp(user->server,""))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server)) || (!strcmp(user->server,""))) { // user is ulined, can speak regardless return 0; @@ -245,7 +245,7 @@ class ModuleServices : public Module userrec* u = (userrec*)dest; if ((u->IsModeSet('R')) && (user->IsModeSet('r'))) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; @@ -271,7 +271,7 @@ class ModuleServices : public Module { if (user->IsModeSet('r')) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) { // user is ulined, won't be stopped from joining return 0; diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 0d7ff4339..d3a16fa05 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -133,7 +133,7 @@ class ModuleServicesAccount : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "RM", 4); + ServerInstance->Modes->InsertMode(output, "RM", 4); } /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */ @@ -165,7 +165,7 @@ class ModuleServicesAccount : public Module if ((c->IsModeSet('M')) && (!account)) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server)) || (!strcmp(user->server,""))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server)) || (!strcmp(user->server,""))) { // user is ulined, can speak regardless return 0; @@ -182,7 +182,7 @@ class ModuleServicesAccount : public Module if ((u->modes['R'-65]) && (!account)) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) { // user is ulined, can speak regardless return 0; @@ -212,7 +212,7 @@ class ModuleServicesAccount : public Module { if (!account) { - if ((ServerInstance->is_uline(user->nick)) || (ServerInstance->is_uline(user->server))) + if ((ServerInstance->ULine(user->nick)) || (ServerInstance->ULine(user->server))) { // user is ulined, won't be stopped from joining return 0; diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index b9e15143d..8aa3e2b65 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1007,7 +1007,7 @@ class TreeSocket : public InspSocket /* We only care about whats being set, * not whats being unset */ - mh = this->Instance->ModeGrok->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); + mh = this->Instance->Modes->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); if ((mh) && (mh->GetNumParams(adding) > 0) && (!mh->IsListMode())) { @@ -1072,7 +1072,7 @@ class TreeSocket : public InspSocket } else { - mh = this->Instance->ModeGrok->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); + mh = this->Instance->Modes->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); if (mh) { @@ -1097,7 +1097,7 @@ class TreeSocket : public InspSocket } else { - mh = this->Instance->ModeGrok->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); + mh = this->Instance->Modes->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); if (mh) { @@ -1159,7 +1159,7 @@ class TreeSocket : public InspSocket } else /* U-lined servers always win regardless of their TS */ - if ((TS > ourTS) && (!this->Instance->is_uline(source.c_str()))) + if ((TS > ourTS) && (!this->Instance->ULine(source.c_str()))) { /* Bounce the mode back to its sender.* We use our lower TS, so the other end * SHOULD accept it, if its clock is right. @@ -1204,7 +1204,7 @@ class TreeSocket : public InspSocket break; default: /* Find the mode handler for this mode */ - mh = this->Instance->ModeGrok->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); + mh = this->Instance->Modes->FindMode(*x, chan ? MODETYPE_CHANNEL : MODETYPE_USER); /* Got a mode handler? * This also prevents us bouncing modes we have no handler for. @@ -1272,7 +1272,7 @@ class TreeSocket : public InspSocket /* The server was ulined, but something iffy is up with the TS. * Sound the alarm bells! */ - if ((this->Instance->is_uline(sourceserv.c_str())) && (TS > ourTS)) + if ((this->Instance->ULine(sourceserv.c_str())) && (TS > ourTS)) { this->Instance->WriteOpers("\2WARNING!\2 U-Lined server '%s' has bad TS for '%s' (accepted change): \2SYNC YOUR CLOCKS\2 to avoid this notice",sourceserv.c_str(),params[0].c_str()); } @@ -1416,7 +1416,7 @@ class TreeSocket : public InspSocket /* theres a mode for this user. push them onto the mode queue, and flush it * if there are more than MAXMODES to go. */ - if ((ourTS >= TS) || (this->Instance->is_uline(who->server))) + if ((ourTS >= TS) || (this->Instance->ULine(who->server))) { /* We also always let u-lined clients win, no matter what the TS value */ ServerInstance->Log(DEBUG,"Our our channel newer than theirs, accepting their modes"); @@ -3427,7 +3427,7 @@ class ModuleSpanningTree : public Module } for (unsigned int q = 0; q < Current->ChildCount(); q++) { - if ((HideULines) && (ServerInstance->is_uline(Current->GetChild(q)->GetName().c_str()))) + if ((HideULines) && (ServerInstance->ULine(Current->GetChild(q)->GetName().c_str()))) { if (*user->oper) { @@ -3440,7 +3440,7 @@ class ModuleSpanningTree : public Module } } /* Don't display the line if its a uline, hide ulines is on, and the user isnt an oper */ - if ((HideULines) && (ServerInstance->is_uline(Current->GetName().c_str())) && (!*user->oper)) + if ((HideULines) && (ServerInstance->ULine(Current->GetName().c_str())) && (!*user->oper)) return; user->WriteServ("364 %s %s %s :%d %s",user->nick,Current->GetName().c_str(),(FlatLinks && (!*user->oper)) ? ServerInstance->Config->ServerName : Parent.c_str(),(FlatLinks && (!*user->oper)) ? 0 : hops,Current->GetDesc().c_str()); } @@ -3464,23 +3464,23 @@ class ModuleSpanningTree : public Module void HandleLusers(const char** parameters, int pcnt, userrec* user) { - unsigned int n_users = ServerInstance->usercnt(); + unsigned int n_users = ServerInstance->UserCount(); /* Only update these when someone wants to see them, more efficient */ - if ((unsigned int)ServerInstance->local_count() > max_local) - max_local = ServerInstance->local_count(); + if ((unsigned int)ServerInstance->LocalUserCount() > max_local) + max_local = ServerInstance->LocalUserCount(); if (n_users > max_global) max_global = n_users; - user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick,n_users-ServerInstance->usercount_invisible(),ServerInstance->usercount_invisible(),this->CountServs()); - if (ServerInstance->usercount_opers()) - user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->usercount_opers()); - if (ServerInstance->usercount_unknown()) - user->WriteServ("253 %s %d :unknown connections",user->nick,ServerInstance->usercount_unknown()); - if (ServerInstance->chancount()) - user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->chancount()); - user->WriteServ("254 %s :I have %d clients and %d servers",user->nick,ServerInstance->local_count(),this->CountLocalServs()); - user->WriteServ("265 %s :Current Local Users: %d Max: %d",user->nick,ServerInstance->local_count(),max_local); + user->WriteServ("251 %s :There are %d users and %d invisible on %d servers",user->nick,n_users-ServerInstance->InvisibleUserCount(),ServerInstance->InvisibleUserCount(),this->CountServs()); + if (ServerInstance->OperCount()) + user->WriteServ("252 %s %d :operator(s) online",user->nick,ServerInstance->OperCount()); + if (ServerInstance->UnregisteredUserCount()) + user->WriteServ("253 %s %d :unknown connections",user->nick,ServerInstance->UnregisteredUserCount()); + if (ServerInstance->ChannelCount()) + user->WriteServ("254 %s %d :channels formed",user->nick,ServerInstance->ChannelCount()); + user->WriteServ("254 %s :I have %d clients and %d servers",user->nick,ServerInstance->LocalUserCount(),this->CountLocalServs()); + user->WriteServ("265 %s :Current Local Users: %d Max: %d",user->nick,ServerInstance->LocalUserCount(),max_local); user->WriteServ("266 %s :Current Global Users: %d Max: %d",user->nick,n_users,max_global); return; } @@ -3526,7 +3526,7 @@ class ModuleSpanningTree : public Module line++; for (unsigned int q = 0; q < Current->ChildCount(); q++) { - if ((HideULines) && (ServerInstance->is_uline(Current->GetChild(q)->GetName().c_str()))) + if ((HideULines) && (ServerInstance->ULine(Current->GetChild(q)->GetName().c_str()))) { if (*user->oper) { diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 708f1e3ce..55cfd7a16 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -76,7 +76,7 @@ class ModuleSSLModes : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output, "z", 4); + ServerInstance->Modes->InsertMode(output, "z", 4); } virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 994a50f33..46e577779 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -120,7 +120,7 @@ class ModuleStripColor : public Module virtual void On005Numeric(std::string &output) { - ServerInstance->ModeGrok->InsertMode(output,"S",4); + ServerInstance->Modes->InsertMode(output,"S",4); } virtual ~ModuleStripColor() diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index f06a41194..f885a6145 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -55,14 +55,14 @@ class cmd_swhois : public command_t { // We already had it set... - if (!ServerInstance->is_uline(user->server)) + if (!ServerInstance->ULine(user->server)) // Ulines set SWHOISes silently ServerInstance->WriteOpers("*** %s used SWHOIS to set %s's extra whois from '%s' to '%s'", user->nick, dest->nick, text->c_str(), line.c_str()); dest->Shrink("swhois"); DELETE(text); } - else if(!ServerInstance->is_uline(user->server)) + else if(!ServerInstance->ULine(user->server)) { // Ulines set SWHOISes silently ServerInstance->WriteOpers("*** %s used SWHOIS to set %s's extra whois to '%s'", user->nick, dest->nick, line.c_str()); diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index dc5f8f977..ac993e0a9 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -74,14 +74,14 @@ class cmd_tban : public command_t } TimedBan T; std::string channelname = parameters[0]; - unsigned long expire = ServerInstance->duration(parameters[1]) + time(NULL); - if (ServerInstance->duration(parameters[1]) < 1) + unsigned long expire = ServerInstance->Duration(parameters[1]) + time(NULL); + if (ServerInstance->Duration(parameters[1]) < 1) { user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid ban time"); return; } char duration[MAXBUF]; - snprintf(duration,MAXBUF,"%lu",ServerInstance->duration(parameters[1])); + snprintf(duration,MAXBUF,"%lu",ServerInstance->Duration(parameters[1])); std::string mask = parameters[2]; const char *setban[32]; setban[0] = parameters[0]; -- cgit v1.2.3