diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:53:48 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-10 23:53:48 +0000 |
commit | d0b4bb3811458aa335857514e4cbb95d5c84f433 (patch) | |
tree | e3a88027d3ef17a26a6d1535213244536ca4dcbd /src/modules/m_swhois.cpp | |
parent | 55e2180b4a5fb65faac05ce4956ab1e5515fa9e5 (diff) |
Last of Server:: methods moved to InspIRCd::. Server:: removed.
This will need a real good tidyup later, because now everything is in the right place, but its a mess because for now i threw them into place (e.g. space indenting, etc)
Next on the todo: Make command handlers have a ServerInstance (gank!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4861 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_swhois.cpp')
-rw-r--r-- | src/modules/m_swhois.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index b14cdcfc2..e9a4f8903 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -26,11 +26,10 @@ extern InspIRCd* ServerInstance; class cmd_swhois : public command_t { - Server* Srv; + public: - cmd_swhois(Server* server) : command_t("SWHOIS",'o',2) + cmd_swhois() : command_t("SWHOIS",'o',2) { - this->Srv = server; this->source = "m_swhois.so"; syntax = "<nick> <swhois>"; } @@ -56,14 +55,14 @@ class cmd_swhois : public command_t { // We already had it set... - if (!Srv->IsUlined(user->server)) + if (!ServerInstance->IsUlined(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(!Srv->IsUlined(user->server)) + else if(!ServerInstance->IsUlined(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()); @@ -78,7 +77,7 @@ class cmd_swhois : public command_t class ModuleSWhois : public Module { cmd_swhois* mycommand; - Server* Srv; + ConfigReader* Conf; public: @@ -86,8 +85,8 @@ class ModuleSWhois : public Module { Conf = new ConfigReader(); - mycommand = new cmd_swhois(Srv); - Srv->AddCommand(mycommand); + mycommand = new cmd_swhois(); + ServerInstance->AddCommand(mycommand); } void OnRehash(const std::string ¶meter) |