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_tban.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_tban.cpp')
-rw-r--r-- | src/modules/cs_tban.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/modules/cs_tban.cpp b/src/modules/cs_tban.cpp index 88e541ac8..844606222 100644 --- a/src/modules/cs_tban.cpp +++ b/src/modules/cs_tban.cpp @@ -12,7 +12,6 @@ * 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. - * */ /*************************************************************************/ @@ -29,11 +28,14 @@ void mAddLanguages(); static Module *me = NULL; -#define LANG_NUM_STRINGS 4 -#define TBAN_HELP 0 -#define TBAN_SYNTAX 1 -#define TBAN_HELP_DETAIL 2 -#define TBAN_RESPONSE 3 +enum +{ + TBAN_HELP, + TBAN_SYNTAX, + TBAN_HELP_DETAIL, + TBAN_RESPONSE, + LANG_NUM_STRINGS +}; class CommandCSTBan : public Command { @@ -57,14 +59,12 @@ class CommandCSTBan : public Command else if (!(u2 = finduser(nick))) notice_lang(Config.s_ChanServ, u, NICK_X_NOT_IN_USE, nick); else - { if (canBanUser(c, u, u2)) { get_idealban(c->ci, u2, mask, sizeof(mask)); addBan(c, dotime(time), mask); mySendResponse(u, chan, mask, time); } - } return MOD_CONT; } @@ -179,9 +179,7 @@ class TempBan : public CallBack Channel *c; if ((c = findchan(chan)) && c->ci) - { c->RemoveMode(NULL, CMODE_BAN, mask); - } } }; |