- char topic[MAXBUF];
- strlcpy(topic,parameters[1],MAXBUF);
- if (strlen(topic)>MAXTOPIC)
- {
- topic[MAXTOPIC] = '\0';
- }
-
- if (user->fd > -1)
- {
- int MOD_RESULT = 0;
- FOREACH_RESULT(I_OnLocalTopicChange,OnLocalTopicChange(user,Ptr,topic));
- if (MOD_RESULT)
- return;
- }
-
- strlcpy(Ptr->topic,topic,MAXTOPIC);
- strlcpy(Ptr->setby,user->nick,NICKMAX);
- Ptr->topicset = TIME;
- WriteChannel(Ptr,user,"TOPIC %s :%s",Ptr->name, Ptr->topic);
- if (user->fd > -1)
- {
- FOREACH_MOD(I_OnPostLocalTopicChange,OnPostLocalTopicChange(user,Ptr,topic));
- }
+ if (IS_LOCAL(user))
+ {
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnLocalTopicChange,OnLocalTopicChange(user,Ptr,topic));
+ if (MOD_RESULT)
+ return;