summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-08-26 17:18:51 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-08-26 17:18:51 +0000
commit7e7f83a2dfc328105217c37130ea53f5955b7cc0 (patch)
tree0add158ef6cf1502ca15b9d76c6cd1ec693767b7 /src
parent6c61225920680cf9b616bdb982018847667be85e (diff)
BUILD : 1.7.5 (337) BUGS : N/A NOTES : Moved new channel registeration checks
git-svn-id: svn://svn.anope.org/anope/trunk@337 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@213 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/chanserv.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index b3948cd25..b18c492fd 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -2515,30 +2515,19 @@ static int do_register(User * u)
return MOD_CONT;
}
- /* Confirm that the channel is in the RFC spec */
- if (*chan != '#' || *chan == '&') {
- /* RFC says channels start with & or # so if the first is not # complain */
- notice_lang(s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
- return MOD_CONT;
- }
-
- /* Throw a message that the channel is non existant */
- if (!(c = findchan(chan))) {
- alog("%s: %s attempted to register a non-existant channel [%s] ",
- s_ChanServ, u->nick, chan);
- notice_lang(s_NickServ, u, CHAN_REGISTER_NONE_CHANNEL, chan);
- return MOD_CONT;
- }
-
if (!desc) {
syntax_error(s_ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
} else if (*chan == '&') {
notice_lang(s_ChanServ, u, CHAN_REGISTER_NOT_LOCAL);
+ } else if (*chan != '#') {
+ notice_lang(s_ChanServ, u, CHAN_SYMBOL_REQUIRED);
} else if (!u->na || !(nc = u->na->nc)) {
notice_lang(s_ChanServ, u, CHAN_MUST_REGISTER_NICK, s_NickServ);
} else if (!nick_recognized(u)) {
notice_lang(s_ChanServ, u, CHAN_MUST_IDENTIFY_NICK, s_NickServ,
s_NickServ);
+ } else if (!(c = findchan(chan))) {
+ notice_lang(s_NickServ, u, CHAN_REGISTER_NONE_CHANNEL, chan);
} else if ((ci = cs_findchan(chan)) != NULL) {
if (ci->flags & CI_VERBOTEN) {
alog("%s: Attempt to register FORBIDden channel %s by %s!%s@%s", s_ChanServ, ci->name, u->nick, u->username, common_get_vhost(u));