* note: it is guaranteed that parv[0]..parv[parc-1] are all
* non-NULL pointers.
*/
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
+#include "config.h"
+
#include "channel.h"
#include "client.h"
#include "hash.h"
newtopic=ircd_strncmp(chptr->topic,topic,TOPICLEN)!=0;
/* setting a topic */
ircd_strncpy(chptr->topic, topic, TOPICLEN);
- ircd_strncpy(chptr->topic_nick, sptr->name, NICKLEN);
+ ircd_strncpy(chptr->topic_nick, cli_name(sptr), NICKLEN);
chptr->topic_time = CurrentTime;
/* Fixed in 2.10.11: Don't propergate local topics */
if (!IsLocalChannel(chptr->chname))
sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H :%s", chptr,
chptr->topic);
if (newtopic)
- sendcmdto_channel_butserv(sptr, CMD_TOPIC, chptr, "%H :%s", chptr,
- chptr->topic);
+ sendcmdto_channel_butserv_butone(sptr, CMD_TOPIC, chptr, NULL,
+ "%H :%s", chptr, chptr->topic);
/* if this is the same topic as before we send it to the person that
* set it (so they knew it went through ok), but don't bother sending
* it to everyone else on the channel to save bandwidth
/* Modeless Channels don't have topics */
if (IsModelessChannel(name))
{
- /* Protocol Violation? */
+ protocol_violation(sptr,"Attempted to topic modeless channel");
send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
continue;
}
+
/* Ignore requests for topics from remote servers */
if (IsLocalChannel(name) && !MyUser(sptr))
- /* Protocol Violation warning here? */
+ {
+ protocol_violation(sptr,"Topic request");
continue;
+ }
do_settopic(sptr,cptr,chptr,topic);
}