summaryrefslogtreecommitdiff
path: root/src/core/bs_bot.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-06-21 23:14:28 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-06-21 23:14:28 -0400
commit1e20877e2f529b61b205a0b1202c32962ee47938 (patch)
tree85e4655edf6071d41391362b5d9fcdd0589d63c8 /src/core/bs_bot.cpp
parentfb16ce72a0b5a3ce336e003327c8d1740f4fdb98 (diff)
The next of a few "CBX OCDing over code style" commits, focusing on src/core/bs_* and src/core/cs_*.
Diffstat (limited to 'src/core/bs_bot.cpp')
-rw-r--r--src/core/bs_bot.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/core/bs_bot.cpp b/src/core/bs_bot.cpp
index 1d3103e29..2b7cc5cf4 100644
--- a/src/core/bs_bot.cpp
+++ b/src/core/bs_bot.cpp
@@ -7,9 +7,8 @@
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
- *
- *
*/
+
/*************************************************************************/
#include "module.h"
@@ -57,14 +56,12 @@ class CommandBSBot : public Command
return MOD_CONT;
}
- for (ch = nick; *ch && (ch - nick) < Config.NickLen; ch++)
- {
+ for (ch = nick; *ch && ch - nick < Config.NickLen; ++ch)
if (!isvalidnick(*ch))
{
notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- }
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
@@ -80,15 +77,12 @@ class CommandBSBot : public Command
return MOD_CONT;
}
- for (ch = user; *ch && (ch - user) < Config.UserLen; ch++)
- {
+ for (ch = user; *ch && ch - user < Config.UserLen; ++ch)
if (!isalnum(*ch))
{
notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen);
return MOD_CONT;
}
- }
-
/* We check whether the nick is registered, and inform the user
* if so. You need to drop the nick manually before you can use
@@ -185,14 +179,12 @@ class CommandBSBot : public Command
return MOD_CONT;
}
- for (ch = nick; *ch && (ch - nick) < Config.NickLen; ch++)
- {
+ for (ch = nick; *ch && ch - nick < Config.NickLen; ++ch)
if (!isvalidnick(*ch))
{
notice_lang(Config.s_BotServ, u, BOT_BAD_NICK);
return MOD_CONT;
}
- }
/* check for hardcored ircd forbidden nicks */
if (!ircdproto->IsNickValid(nick))
@@ -208,16 +200,12 @@ class CommandBSBot : public Command
}
if (user)
- {
- for (ch = user; *ch && (ch - user) < Config.UserLen; ch++)
- {
+ for (ch = user; *ch && ch - user < Config.UserLen; ++ch)
if (!isalnum(*ch))
{
notice_lang(Config.s_BotServ, u, BOT_BAD_IDENT, Config.UserLen);
return MOD_CONT;
}
- }
- }
ci::string ci_bi_nick(bi->nick.c_str());
if (ci_bi_nick != nick && findbot(nick))
@@ -271,10 +259,9 @@ class CommandBSBot : public Command
if (user)
{
- if (ircd->ts6) {
+ if (ircd->ts6)
// This isn't the nicest way to do this, unfortunately.
bi->uid = ts6_uid_retrieve();
- }
ircdproto->SendClientIntroduction(bi->nick, bi->user, bi->host, bi->real, ircd->pseudoclient_mode, bi->uid);
XLine x(bi->nick.c_str(), "Reserved for services");
ircdproto->SendSQLine(&x);