diff options
| author | Adam <Adam@anope.org> | 2012-10-01 01:56:57 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-10-01 01:56:57 -0400 |
| commit | 89428a9d1032e3c2a6e397629a32862b3e58d708 (patch) | |
| tree | d507904b3fa1cc084f0f3e688c839bcdd47f79d7 /modules/pseudoclients | |
| parent | b937d6310d9a7c0e2434200306b63d513cb2ae61 (diff) | |
Cleanup of all of the protocol modules, rewrote message handling system to be a bit more C++ ish
Diffstat (limited to 'modules/pseudoclients')
| -rw-r--r-- | modules/pseudoclients/botserv.cpp | 2 | ||||
| -rw-r--r-- | modules/pseudoclients/hostserv.cpp | 17 | ||||
| -rw-r--r-- | modules/pseudoclients/operserv.cpp | 4 |
3 files changed, 11 insertions, 12 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index beab46b23..d792f74da 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -199,7 +199,7 @@ class BotServCore : public Module "the following characters: %s"), Config->ChanServ.c_str(), Config->BSFantasyCharacter.c_str()); } - EventReturn OnChannelModeSet(Channel *c, User *setter, ChannelModeName Name, const Anope::string ¶m) anope_override + EventReturn OnChannelModeSet(Channel *c, MessageSource &, ChannelModeName Name, const Anope::string ¶m) anope_override { if (Config->BSSmartJoin && Name == CMODE_BAN && c->ci && c->ci->bi && c->FindUser(c->ci->bi)) { diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index c350903d0..33d183b9a 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -20,8 +20,8 @@ class HostServCore : public Module { this->SetAuthor("Anope"); - if (!ircd || !ircd->vhost) - throw ModuleException("Your IRCd does not suppor vhosts"); + if (!ircdproto || !ircdproto->CanSetVHost) + throw ModuleException("Your IRCd does not support vhosts"); const BotInfo *HostServ = findbot(Config->HostServ); if (HostServ == NULL) @@ -36,18 +36,17 @@ class HostServCore : public Module const NickAlias *na = findnick(u->nick); if (!na || !na->HasVhost()) na = findnick(u->Account()->display); - if (!na || !na->HasVhost()) + if (!ircdproto->CanSetVHost || !na || !na->HasVhost()) return; if (u->vhost.empty() || !u->vhost.equals_cs(na->GetVhostHost()) || (!na->GetVhostIdent().empty() && !u->GetVIdent().equals_cs(na->GetVhostIdent()))) { ircdproto->SendVhost(u, na->GetVhostIdent(), na->GetVhostHost()); - if (ircd->vhost) - { - u->vhost = na->GetVhostHost(); - u->UpdateHost(); - } - if (ircd->vident && !na->GetVhostIdent().empty()) + + u->vhost = na->GetVhostHost(); + u->UpdateHost(); + + if (ircdproto->CanSetVIdent && !na->GetVhostIdent().empty()) u->SetVIdent(na->GetVhostIdent()); const BotInfo *bi = findbot(Config->HostServ); diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index d9fa44597..b02120e91 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -37,7 +37,7 @@ class SGLineManager : public XLineManager { try { - if (!ircd->szline) + if (!ircdproto->CanSZLine) throw SocketException("SZLine is not supported"); else if (x->GetUser() != "*") throw SocketException("Can not ZLine a username"); @@ -236,7 +236,7 @@ class OperServCore : public Module void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override { - if (ircd->sqline && !u->HasMode(UMODE_OPER)) + if (ircdproto->CanSQLine && !u->HasMode(UMODE_OPER)) this->sqlines.CheckAllXLines(u); } |
