summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-02-04 20:51:52 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-02-04 20:51:52 +0000
commit80e5f30a4994a069481ba75ccce0672911de10a8 (patch)
tree5bdf90636e11adb244bfcaa7c37901888a8f6c00
parent5c0f1b86919e3e8f10d489927320aab1ec63e188 (diff)
BUILD : 1.7.13 (962) BUGS : NOTES : Added events for channel kicks and nickserv logout
git-svn-id: svn://svn.anope.org/anope/trunk@962 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@689 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--docs/EVENTS9
-rw-r--r--include/events.h2
-rw-r--r--src/channels.c1
-rw-r--r--src/core/ns_logout.c5
-rw-r--r--version.log6
6 files changed, 22 insertions, 2 deletions
diff --git a/Changes b/Changes
index cc692fc71..b43734110 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Anope Version S V N
--------------------
Provided by Anope Dev. <dev@anope.org> - 2005
+02/04 A Events for channel kicks and NickServ logout. [ #00]
01/14 F SGLines will now be removed correctly. [ #00]
01/26 F Export buildStringList() for modules. [#425]
diff --git a/docs/EVENTS b/docs/EVENTS
index 8a3cd502e..a50366515 100644
--- a/docs/EVENTS
+++ b/docs/EVENTS
@@ -239,6 +239,11 @@ Anope Internal Events
A channel has been forbidden (ChanServ FORBID).
av[0] The name of the channel that has been forbidden.
+ EVENT_CHAN_KICK
+ Someone has just been kicked from a channel.
+ av[0] The nick of the user that has been kicked.
+ av[1] The channel the user has been kicked from.
+
EVENT_CHAN_REGISTERED
A new channel has been registered.
av[0] The name of the channel that has been registered.
@@ -319,6 +324,10 @@ Anope Internal Events
A user has just identified for it's nickname with NickServ.
av[0] The nickname of the user that just identified.
+ EVENT_NICK_LOGOUT
+ A user has just (been) logged out.
+ av[0] The nickname of the user that has (been) logged out.
+
EVENT_NICK_REGISTERED
A new user has just registered it's nickname. This event is being
emitted when the registration is completed, but the user modes have not
diff --git a/include/events.h b/include/events.h
index 42f2c03d0..bfee9a0e1 100644
--- a/include/events.h
+++ b/include/events.h
@@ -57,3 +57,5 @@
#define EVENT_ACCESS_ADD "access_add"
#define EVENT_ACCESS_CHANGE "access_change"
#define EVENT_ACCESS_DEL "access_del"
+#define EVENT_NICK_LOGOUT "nick_logout"
+#define EVENT_CHAN_KICK "chan_kick"
diff --git a/src/channels.c b/src/channels.c
index f1add79e3..8156b1daf 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -628,6 +628,7 @@ void do_kick(const char *source, int ac, char **av)
for (c = user->chans; c && stricmp(av[0], c->chan->name) != 0;
c = c->next);
if (c) {
+ send_event(EVENT_CHAN_KICK, 2, user->nick, av[0]);
chan_deluser(user, c->chan);
if (c->next)
c->next->prev = c->prev;
diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c
index ef91b75a9..a6afae615 100644
--- a/src/core/ns_logout.c
+++ b/src/core/ns_logout.c
@@ -113,13 +113,16 @@ int do_logout(User * u)
/* Stop nick tracking if enabled */
if (NSNickTracking)
+ /* Shouldn't this be u2? -GD */
nsStopNickTracking(u);
/* Clear any timers again */
if (u->na->nc->flags & NI_KILLPROTECT) {
del_ns_timeout(u->na, TO_COLLIDE);
}
-
+
+ /* Send out an event */
+ send_event(EVENT_NICK_LOGOUT, 1, u2->nick);
}
return MOD_CONT;
}
diff --git a/version.log b/version.log
index 69c5de45b..b7c980864 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="13"
VERSION_EXTRA="-svn"
-VERSION_BUILD="961"
+VERSION_BUILD="962"
# $Log$
#
+# BUILD : 1.7.13 (962)
+# BUGS :
+# NOTES : Added events for channel kicks and nickserv logout
+#
# BUILD : 1.7.13 (961)
# BUGS :
# NOTES : Added support for Charybdis IRCd