diff options
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/inspircd11.c | 10 | ||||
| -rw-r--r-- | src/protocol/inspircd12.cpp | 10 | ||||
| -rw-r--r-- | src/protocol/ratbox.c | 10 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 5e93fa68e..0aa2321b4 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -889,10 +889,12 @@ int anope_event_topic(const char *source, int ac, const char **av) 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], ""); + if (ac > 1 && *av[1]) { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, av[1])); + } + else { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, "")); + } return MOD_CONT; } diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 0b36267da..0fc07852d 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -968,10 +968,12 @@ int anope_event_topic(const char *source, int ac, const char **av) 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], ""); + if (ac > 1 && *av[1]) { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, av[0])); + } + else { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, "")); + } return MOD_CONT; } diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index d87d0b64e..261aeb031 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -782,10 +782,12 @@ int anope_event_topic(const char *source, int ac, const char **av) 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], ""); + if (ac > 1 && *av[1]) { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, av[1])); + } + else { + FOREACH_MOD(I_OnTopicUpdated, OnTopicUpdated(c, "")); + } } return MOD_CONT; } |
