summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-05-22 07:40:22 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-05-22 07:40:22 +0000
commitd5f036017510dad134fd9c8d471135f774f1fe17 (patch)
treeee037c32da9ad223cd660af9f5ed36133a517bec /src/core
parentfae2710ba7e068edb68baf26f901af564741e5bf (diff)
Rewrote the nick colliding/releaseing/canceling system, fixes many many bugs on IRCds without svsnick and/or svshold
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2975 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
-rw-r--r--src/core/bs_bot.c1
-rw-r--r--src/core/ns_forbid.c2
-rw-r--r--src/core/ns_identify.c7
-rw-r--r--src/core/ns_logout.c8
-rw-r--r--src/core/ns_recover.c4
-rw-r--r--src/core/ns_release.c6
-rw-r--r--src/core/ns_suspend.c7
7 files changed, 11 insertions, 24 deletions
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c
index 9c7ce4854..09463a77b 100644
--- a/src/core/bs_bot.c
+++ b/src/core/bs_bot.c
@@ -274,6 +274,7 @@ class CommandBSBot : public Command
bi->uid = ts6_uid_retrieve();
}
ircdproto->SendClientIntroduction(bi->nick, bi->user, bi->host, bi->real, ircd->pseudoclient_mode, bi->uid);
+ ircdproto->SendSQLine(bi->nick, "Reserved for services");
bi->RejoinAll();
}
diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c
index 18f3bf2aa..7ddaec68a 100644
--- a/src/core/ns_forbid.c
+++ b/src/core/ns_forbid.c
@@ -65,7 +65,7 @@ class CommandNSForbid : public Command
if (curr)
{
notice_lang(Config.s_NickServ, curr, FORCENICKCHANGE_NOW);
- collide(na, 0);
+ curr->Collide(na);
}
diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c
index f16b5e84c..1b829179c 100644
--- a/src/core/ns_identify.c
+++ b/src/core/ns_identify.c
@@ -15,9 +15,6 @@
#include "module.h"
-#define TO_COLLIDE 0 /* Collide the user with this nick */
-#define TO_RELEASE 1 /* Release a collided nick */
-
class CommandNSIdentify : public Command
{
public:
@@ -94,10 +91,6 @@ class CommandNSIdentify : public Command
if (u->IsIdentified())
check_memos(u);
-
- /* Clear any timers */
- if (na->nc->HasFlag(NI_KILLPROTECT))
- del_ns_timeout(na, TO_COLLIDE);
}
return MOD_CONT;
}
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index fcb14fb8e..7e16dc8f5 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -15,9 +15,6 @@
#include "module.h"
-#define TO_COLLIDE 0 /* Collide the user with this nick */
-#define TO_RELEASE 1 /* Release a collided nick */
-
class CommandNSLogout : public Command
{
public:
@@ -44,7 +41,6 @@ class CommandNSLogout : public Command
if (nick && !param.empty() && param == "REVALIDATE")
{
- cancel_user(u2);
validate_user(u2);
}
@@ -57,10 +53,6 @@ class CommandNSLogout : public Command
else
notice_lang(Config.s_NickServ, u, NICK_LOGOUT_SUCCEEDED);
- /* Clear any timers again */
- if (na && u->Account()->HasFlag(NI_KILLPROTECT))
- del_ns_timeout(na, TO_COLLIDE);
-
ircdproto->SendAccountLogout(u2, u2->Account());
ircdproto->SendUnregisteredNick(u2);
diff --git a/src/core/ns_recover.c b/src/core/ns_recover.c
index 23b284e46..99b5e34f1 100644
--- a/src/core/ns_recover.c
+++ b/src/core/ns_recover.c
@@ -49,7 +49,7 @@ class CommandNSRecover : public Command
char relstr[192];
notice_lang(Config.s_NickServ, u2, FORCENICKCHANGE_NOW);
- collide(na, 0);
+ u2->Collide(na);
/* Convert Config.NSReleaseTimeout seconds to string format */
duration(na->nc, relstr, sizeof(relstr), Config.NSReleaseTimeout);
@@ -74,7 +74,7 @@ class CommandNSRecover : public Command
char relstr[192];
notice_lang(Config.s_NickServ, u2, FORCENICKCHANGE_NOW);
- collide(na, 0);
+ u2->Collide(na);
/* Convert Config.NSReleaseTimeout seconds to string format */
duration(na->nc, relstr, sizeof(relstr), Config.NSReleaseTimeout);
diff --git a/src/core/ns_release.c b/src/core/ns_release.c
index a4169ecda..6f360e942 100644
--- a/src/core/ns_release.c
+++ b/src/core/ns_release.c
@@ -35,14 +35,14 @@ class CommandNSRelease : public Command
notice_lang(Config.s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
else if (na->nc->HasFlag(NI_SUSPENDED))
notice_lang(Config.s_NickServ, u, NICK_X_SUSPENDED, na->nick);
- else if (!(na->HasFlag(NS_KILL_HELD)))
+ else if (!(na->HasFlag(NS_HELD)))
notice_lang(Config.s_NickServ, u, NICK_RELEASE_NOT_HELD, nick);
else if (!pass.empty())
{
int res = enc_check_password(pass, na->nc->pass);
if (res == 1)
{
- release(na, 0);
+ na->Release();
notice_lang(Config.s_NickServ, u, NICK_RELEASED);
}
else
@@ -60,7 +60,7 @@ class CommandNSRelease : public Command
{
if (u->Account() == na->nc || (!(na->nc->HasFlag(NI_SECURE)) && is_on_access(u, na->nc)))
{
- release(na, 0);
+ na->Release();
notice_lang(Config.s_NickServ, u, NICK_RELEASED);
}
else
diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c
index 7c3dd0ca9..2354fe66b 100644
--- a/src/core/ns_suspend.c
+++ b/src/core/ns_suspend.c
@@ -70,11 +70,12 @@ class CommandNSSuspend : public Command
if (na2->last_quit)
delete [] na2->last_quit;
na2->last_quit = sstrdup(reason);
- /* removes nicktracking */
+
if ((u2 = finduser(na2->nick)))
+ {
u2->Logout();
- /* force guestnick */
- collide(na2, 0);
+ u2->Collide(na2);
+ }
}
}