summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-30 17:21:44 -0400
committerAdam <Adam@anope.org>2010-06-18 21:04:09 -0400
commit6cd88494662c5c4af2da891926dcc82367596cb9 (patch)
tree59f67163abee4e7468a26b25f9cecca270f57b70 /src/modules
parentb8f9116b19eb511c4f5e6a683725f50bf732a7dd (diff)
Moved the *Serv help functions to Command, will come in use later with subcommands
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/cs_appendtopic.cpp11
-rw-r--r--src/modules/cs_enforce.cpp11
-rw-r--r--src/modules/cs_tban.cpp11
-rw-r--r--src/modules/hs_request.cpp20
-rw-r--r--src/modules/mysql/db_mysql_write.cpp14
-rw-r--r--src/modules/os_info.cpp24
6 files changed, 46 insertions, 45 deletions
diff --git a/src/modules/cs_appendtopic.cpp b/src/modules/cs_appendtopic.cpp
index 311ac0717..a44e6d1a9 100644
--- a/src/modules/cs_appendtopic.cpp
+++ b/src/modules/cs_appendtopic.cpp
@@ -128,6 +128,11 @@ class CommandCSAppendTopic : public Command
{
me->NoticeLang(Config.s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
+ }
};
class CSAppendTopic : public Module
@@ -222,12 +227,6 @@ class CSAppendTopic : public Module
this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt);
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
-
- ModuleManager::Attach(I_OnChanServHelp, this);
- }
- void OnChanServHelp(User *u)
- {
- this->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
}
};
diff --git a/src/modules/cs_enforce.cpp b/src/modules/cs_enforce.cpp
index 906e42ea6..271b9da05 100644
--- a/src/modules/cs_enforce.cpp
+++ b/src/modules/cs_enforce.cpp
@@ -216,6 +216,11 @@ class CommandCSEnforce : public Command
{
me->NoticeLang(Config.s_ChanServ, u, LNG_ENFORCE_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
+ }
};
class CSEnforce : public Module
@@ -438,12 +443,6 @@ class CSEnforce : public Module
this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt);
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
-
- ModuleManager::Attach(I_OnChanServHelp, this);
- }
- void OnChanServHelp(User *u)
- {
- this->NoticeLang(Config.s_ChanServ, u, LNG_CHAN_HELP);
}
};
diff --git a/src/modules/cs_tban.cpp b/src/modules/cs_tban.cpp
index 483f5f2d6..5a768dc81 100644
--- a/src/modules/cs_tban.cpp
+++ b/src/modules/cs_tban.cpp
@@ -83,6 +83,11 @@ class CommandCSTBan : public Command
{
me->NoticeLang(Config.s_ChanServ, u, TBAN_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_ChanServ, u, TBAN_HELP);
+ }
};
class CSTBan : public Module
@@ -154,12 +159,6 @@ class CSTBan : public Module
this->InsertLanguage(LANG_PT, LANG_NUM_STRINGS, langtable_pt);
this->InsertLanguage(LANG_RU, LANG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LANG_NUM_STRINGS, langtable_it);
-
- ModuleManager::Attach(I_OnChanServHelp, this);
- }
- void OnChanServHelp(User *u)
- {
- this->NoticeLang(Config.s_ChanServ, u, TBAN_HELP);
}
};
diff --git a/src/modules/hs_request.cpp b/src/modules/hs_request.cpp
index 385dfc8c5..cc5637bef 100644
--- a/src/modules/hs_request.cpp
+++ b/src/modules/hs_request.cpp
@@ -205,6 +205,11 @@ class CommandHSRequest : public Command
{
me->NoticeLang(Config.s_HostServ, u, LNG_REQUEST_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_HostServ, u, LNG_HELP);
+ }
};
class CommandHSActivate : public Command
@@ -257,6 +262,11 @@ class CommandHSActivate : public Command
{
me->NoticeLang(Config.s_HostServ, u, LNG_ACTIVATE_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_HostServ, u, LNG_HELP_SETTER);
+ }
};
class CommandHSReject : public Command
@@ -645,8 +655,8 @@ class HSRequest : public Module
this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it);
- Implementation i[] = { I_OnHostServHelp, I_OnPreCommand, I_OnDatabaseRead, I_OnDatabaseWrite };
- ModuleManager::Attach(i, this, 4);
+ Implementation i[] = { I_OnPreCommand, I_OnDatabaseRead, I_OnDatabaseWrite };
+ ModuleManager::Attach(i, this, 3);
}
~HSRequest()
@@ -698,12 +708,6 @@ class HSRequest : public Module
return EVENT_CONTINUE;
}
- void OnHostServHelp(User *u)
- {
- this->NoticeLang(Config.s_HostServ, u, LNG_HELP);
- this->NoticeLang(Config.s_HostServ, u, LNG_HELP_SETTER);
- }
-
EventReturn OnDatabaseRead(const std::vector<std::string> &params)
{
if (params[0] == "HS_REQUEST" && params.size() >= 5)
diff --git a/src/modules/mysql/db_mysql_write.cpp b/src/modules/mysql/db_mysql_write.cpp
index fdb11562f..b5686fa2f 100644
--- a/src/modules/mysql/db_mysql_write.cpp
+++ b/src/modules/mysql/db_mysql_write.cpp
@@ -391,6 +391,11 @@ class CommandSyncSQL : public Command
notice_help(Config.s_OperServ, u, OPER_HELP_SYNC);
return true;
}
+
+ void OnServHelp(User *u)
+ {
+ notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SQLSYNC);
+ }
};
class DBMySQLWrite : public DBMySQL
@@ -433,15 +438,10 @@ class DBMySQLWrite : public DBMySQL
/* MemoServ */
I_OnMemoSend, I_OnMemoDel,
/* OperServ */
- I_OnOperServHelp, I_OnAddAkill, I_OnDelAkill, I_OnExceptionAdd, I_OnExceptionDel,
+ I_OnAddAkill, I_OnDelAkill, I_OnExceptionAdd, I_OnExceptionDel,
I_OnAddXLine, I_OnDelXLine
};
- ModuleManager::Attach(i, this, 40);
- }
-
- void OnOperServHelp(User *u)
- {
- notice_lang(Config.s_OperServ, u, OPER_HELP_CMD_SQLSYNC);
+ ModuleManager::Attach(i, this, 39);
}
EventReturn OnSaveDatabase()
diff --git a/src/modules/os_info.cpp b/src/modules/os_info.cpp
index a49fa8a88..38d9c99c5 100644
--- a/src/modules/os_info.cpp
+++ b/src/modules/os_info.cpp
@@ -116,6 +116,11 @@ class CommandNSOInfo : public Command
{
me->NoticeLang(Config.s_NickServ, u, OINFO_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_NickServ, u, OINFO_HELP_CMD);
+ }
};
class CommandCSOInfo : public Command
@@ -180,6 +185,11 @@ class CommandCSOInfo : public Command
{
me->NoticeLang(Config.s_ChanServ, u, OCINFO_SYNTAX);
}
+
+ void OnServHelp(User *u)
+ {
+ me->NoticeLang(Config.s_ChanServ, u, OCINFO_HELP_CMD);
+ }
};
class OSInfo : public Module
@@ -409,8 +419,8 @@ class OSInfo : public Module
this->InsertLanguage(LANG_RU, LANG_NUM_STRINGS, langtable_ru);
this->InsertLanguage(LANG_IT, LANG_NUM_STRINGS, langtable_it);
- Implementation i[] = { I_OnNickServHelp, I_OnChanServHelp, I_OnNickInfo, I_OnChanInfo, I_OnDatabaseReadMetadata, I_OnDatabaseWriteMetadata };
- ModuleManager::Attach(i, this, 6);
+ Implementation i[] = { I_OnNickInfo, I_OnChanInfo, I_OnDatabaseReadMetadata, I_OnDatabaseWriteMetadata };
+ ModuleManager::Attach(i, this, 4);
}
~OSInfo()
@@ -452,16 +462,6 @@ class OSInfo : public Module
}
}
- void OnNickServHelp(User *u)
- {
- this->NoticeLang(Config.s_NickServ, u, OINFO_HELP_CMD);
- }
-
- void OnChanServHelp(User *u)
- {
- this->NoticeLang(Config.s_ChanServ, u, OCINFO_HELP_CMD);
- }
-
void OnDatabaseWriteMetadata(void (*WriteMetadata)(const std::string &, const std::string &), NickCore *nc)
{
char *c;