From 3fb604b1c7c910489bb52939e8f20b71560eb2e6 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Sun, 10 Dec 2006 12:27:56 +0000 Subject: [PATCH] BUILD : 1.7.17 (1207) BUGS : 641 NOTES : Fixed EVENT_TOPIC_UPDATED not being sent when the topic was updated from within certain protocol modules git-svn-id: svn://svn.anope.org/anope/trunk@1207 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@926 5417fbe8-f217-4b02-8779-1006273d7864 --- Changes | 1 + src/protocol/charybdis.c | 12 ++++++++++++ src/protocol/hybrid.c | 5 +++++ src/protocol/inspircd.c | 6 ++++++ src/protocol/plexus2.c | 6 ++++++ src/protocol/plexus3.c | 6 ++++++ src/protocol/ratbox.c | 5 +++++ src/protocol/shadowircd.c | 12 ++++++++++++ version.log | 6 +++++- 9 files changed, 58 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index f8c8cf775..70597ac71 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,7 @@ Anope Version S V N 12/09 F Reviewed and updated all of the MySQL code. [ #00] 12/09 F Langfiles had CHANAKILL instead of CHANKILL in syntax lines. [#640] 12/10 F NickServ ALIST not accepting Founder as level param. [#629] +12/10 F EVENT_TOPIC_UPDATES was not always sent when it should be. [#641] Anope Version 1.7.17 -------------------- diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c index 9a8822b5b..6d16eeec5 100644 --- a/src/protocol/charybdis.c +++ b/src/protocol/charybdis.c @@ -655,6 +655,11 @@ int anope_event_topic(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); } return MOD_CONT; } @@ -701,8 +706,15 @@ int anope_event_tburst(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[3]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[3]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); + if (setter) free(setter); + return MOD_CONT; } diff --git a/src/protocol/hybrid.c b/src/protocol/hybrid.c index 580f1ec8c..05c9dc0d7 100644 --- a/src/protocol/hybrid.c +++ b/src/protocol/hybrid.c @@ -568,6 +568,11 @@ int anope_event_topic(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); } return MOD_CONT; } diff --git a/src/protocol/inspircd.c b/src/protocol/inspircd.c index cb79610b8..6d0f6641b 100644 --- a/src/protocol/inspircd.c +++ b/src/protocol/inspircd.c @@ -1153,6 +1153,12 @@ int anope_event_topic(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); + return MOD_CONT; } diff --git a/src/protocol/plexus2.c b/src/protocol/plexus2.c index 6c7f0f2b8..c4ad300af 100644 --- a/src/protocol/plexus2.c +++ b/src/protocol/plexus2.c @@ -666,6 +666,12 @@ anope_event_topic (char *source, int ac, char **av) c->topic_time = topic_time; record_topic (av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); + } return MOD_CONT; } diff --git a/src/protocol/plexus3.c b/src/protocol/plexus3.c index 745a73a6d..e245414be 100644 --- a/src/protocol/plexus3.c +++ b/src/protocol/plexus3.c @@ -609,6 +609,12 @@ anope_event_topic (char *source, int ac, char **av) c->topic_time = topic_time; record_topic (av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); + } return MOD_CONT; } diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 3f89c8a1e..e37fd9be7 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -646,6 +646,11 @@ int anope_event_topic(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); } return MOD_CONT; } diff --git a/src/protocol/shadowircd.c b/src/protocol/shadowircd.c index c02b70913..cc2b3c16d 100644 --- a/src/protocol/shadowircd.c +++ b/src/protocol/shadowircd.c @@ -685,6 +685,11 @@ int anope_event_topic(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[1]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); } return MOD_CONT; } @@ -731,8 +736,15 @@ int anope_event_tburst(char *source, int ac, char **av) c->topic_time = topic_time; record_topic(av[0]); + + if (ac > 1 && *av[3]) + send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[3]); + else + send_event(EVENT_TOPIC_UPDATED, 2, av[0], ""); + if (setter) free(setter); + return MOD_CONT; } diff --git a/version.log b/version.log index d90fd4f32..32a5a5eb7 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="17" VERSION_EXTRA="-svn" -VERSION_BUILD="1206" +VERSION_BUILD="1207" # $Log$ # +# BUILD : 1.7.17 (1207) +# BUGS : 641 +# NOTES : Fixed EVENT_TOPIC_UPDATED not being sent when the topic was updated from within certain protocol modules +# # BUILD : 1.7.17 (1206) # BUGS : 631 # NOTES : Fixed small language mistake in en_us.l and nl.l