diff options
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 635000974..3a30a3972 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -542,14 +542,22 @@ void handle_topic(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"482 %s %s :You must be at least a half-operator to change modes on this channel", user->nick, Ptr->name); return; } - + char topic[MAXBUF]; strlcpy(topic,parameters[1],MAXBUF); if (strlen(topic)>MAXTOPIC) { topic[MAXTOPIC-1] = '\0'; } - + + if (!strcasecmp(user->server,ServerName)) + { + int MOD_RESULT = 0; + FOREACH_RESULT(OnLocalTopicChange(user,Ptr,topic)); + if (MOD_RESULT) + return; + } + strlcpy(Ptr->topic,topic,MAXBUF); strlcpy(Ptr->setby,user->nick,NICKMAX); Ptr->topicset = TIME; @@ -1301,6 +1309,8 @@ void handle_stats(char **parameters, int pcnt, userrec *user) } + FOREACH_MOD OnStats(*parameters[0]); + if (!strcasecmp(parameters[0],"c")) { for (int i = 0; i < ConfValueEnum("link",&config_f); i++) |