diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-27 23:15:05 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-06-27 23:15:05 -0400 |
commit | 28e12bc24a9c85f4f0d1e37567618ec39cb501f6 (patch) | |
tree | cc70ebeef95a9d95174afe3ef038b0d673346f58 /src/modules/cs_appendtopic.cpp | |
parent | 051ebe3eea0f8529b64c0e443c61103ba2f7dee8 (diff) |
The next of a few "CBX OCDing over code style" commits, maybe the last.
NOTES: I have been unable to compile the db_mysql_* functions on my system here, so those are untested. db-convert seems to be badly programmed and needs more work in my opinion.
Diffstat (limited to 'src/modules/cs_appendtopic.cpp')
-rw-r--r-- | src/modules/cs_appendtopic.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/modules/cs_appendtopic.cpp b/src/modules/cs_appendtopic.cpp index a1c84d0ab..03f20ba6c 100644 --- a/src/modules/cs_appendtopic.cpp +++ b/src/modules/cs_appendtopic.cpp @@ -12,8 +12,8 @@ * Send bug reports to the Anope Coder instead of the module * author, because any changes since the inclusion into anope * are not supported by the original author. - * */ + /*************************************************************************/ #include "module.h" @@ -41,11 +41,13 @@ /* DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING */ /* ---------------------------------------------------------------------- */ -#define LNG_NUM_STRINGS 3 - -#define LNG_CHAN_HELP 0 -#define LNG_CHAN_HELP_APPENDTOPIC 1 -#define LNG_APPENDTOPIC_SYNTAX 2 +enum +{ + LNG_CHAN_HELP, + LNG_CHAN_HELP_APPENDTOPIC, + LNG_APPENDTOPIC_SYNTAX, + LNG_NUM_STRINGS +}; static Module *me; @@ -96,20 +98,14 @@ class CommandCSAppendTopic : public Command if (!check_access(u, ci, CA_TOPIC)) Alog() << Config.s_ChanServ << ": " << u->GetMask() << " changed topic of " << c->name << " as services admin."; - if (ircd->join2set) + if (ircd->join2set && whosends(ci) == ChanServ) { - if (whosends(ci) == ChanServ) - { - ChanServ->Join(c); - ircdproto->SendMode(NULL, c, "+o %s", Config.s_ChanServ); // XXX - } + ChanServ->Join(c); + ircdproto->SendMode(NULL, c, "+o %s", Config.s_ChanServ); // XXX } ircdproto->SendTopic(whosends(ci), c, u->nick.c_str(), topic); - if (ircd->join2set) - { - if (whosends(ci) == ChanServ) - ChanServ->Part(c); - } + if (ircd->join2set && whosends(ci) == ChanServ) + ChanServ->Part(c); } return MOD_CONT; } |