1 Topic by info is either 'nick' or 'account.users.quakenet.org'
3 See info in whoban.patch
5 diff -r 98e2da930476 include/channel.h
6 --- a/include/channel.h Tue Mar 23 14:38:30 2010 +0100
7 +++ b/include/channel.h Tue Mar 23 14:39:07 2010 +0100
9 struct Mode mode; /**< This channels mode */
10 unsigned int marker; /**< Channel marker */
11 char topic[TOPICLEN + 1]; /**< Channels topic */
12 - char topic_nick[NICKLEN + 1]; /**< Nick of the person who set
13 + char topic_who[ACCOUNTLEN > NICKLEN ? ACCOUNTLEN+1 : NICKLEN+1]; /**< Nick or account of the person who set
16 + int topic_who_is_account; /**< 0 when topic_who is nick, 1 when an account */
17 char chname[1]; /**< Dynamically allocated string of the
20 diff -r 98e2da930476 ircd/m_burst.c
21 --- a/ircd/m_burst.c Tue Mar 23 14:38:30 2010 +0100
22 +++ b/ircd/m_burst.c Tue Mar 23 14:39:07 2010 +0100
24 /* clear topic set by netrider (if set) */
27 - *chptr->topic_nick = '\0';
28 + *chptr->topic_who = '\0';
29 + chptr->topic_who_is_account = 0;
30 chptr->topic_time = 0;
31 sendcmdto_channel_butserv_butone(&his, CMD_TOPIC, chptr, NULL, 0,
32 "%H :%s", chptr, chptr->topic);
33 diff -r 98e2da930476 ircd/m_check.c
34 --- a/ircd/m_check.c Tue Mar 23 14:38:30 2010 +0100
35 +++ b/ircd/m_check.c Tue Mar 23 14:39:07 2010 +0100
37 send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Topic:: %s", chptr->topic);
40 - send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Set by:: %s", chptr->topic_nick);
41 + send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Set by:: %s%s%s",
42 + chptr->topic_who, chptr->topic_who_is_account ? "." : "", chptr->topic_who_is_account ? feature_str(FEAT_HIDDEN_HOST) : "");
44 send_reply(sptr, SND_EXPLICIT | RPL_DATASTR, ": Set at:: %s [%Tu]", myctime(chptr->topic_time), chptr->topic_time);
46 diff -r 98e2da930476 ircd/m_join.c
47 --- a/ircd/m_join.c Tue Mar 23 14:38:30 2010 +0100
48 +++ b/ircd/m_join.c Tue Mar 23 14:39:07 2010 +0100
51 if (chptr->topic[0]) {
52 send_reply(sptr, RPL_TOPIC, chptr->chname, chptr->topic);
53 - send_reply(sptr, RPL_TOPICWHOTIME, chptr->chname, chptr->topic_nick,
54 + send_reply(sptr, RPL_TOPICWHOTIME, chptr->chname,
56 + chptr->topic_who_is_account ? "." : "",
57 + chptr->topic_who_is_account ? feature_str(FEAT_HIDDEN_HOST) : "",
61 diff -r 98e2da930476 ircd/m_topic.c
62 --- a/ircd/m_topic.c Tue Mar 23 14:38:30 2010 +0100
63 +++ b/ircd/m_topic.c Tue Mar 23 14:39:07 2010 +0100
65 newtopic=ircd_strncmp(chptr->topic,topic,TOPICLEN)!=0;
67 ircd_strncpy(chptr->topic, topic, TOPICLEN);
68 - ircd_strncpy(chptr->topic_nick, cli_name(from), NICKLEN);
69 + ircd_strncpy(chptr->topic_who,
70 + IsAccount(from) ? cli_user(from)->account : cli_name(from),
71 + IsAccount(from) ? ACCOUNTLEN : NICKLEN);
72 + chptr->topic_who_is_account = IsAccount(from) ? 1 : 0;
73 chptr->topic_time = ts ? ts : TStime();
74 /* Fixed in 2.10.11: Don't propagate local topics */
75 if (!IsLocalChannel(chptr->chname))
79 send_reply(sptr, RPL_TOPIC, chptr->chname, chptr->topic);
80 - send_reply(sptr, RPL_TOPICWHOTIME, chptr->chname, chptr->topic_nick,
81 + send_reply(sptr, RPL_TOPICWHOTIME, chptr->chname,
83 + chptr->topic_who_is_account ? "." : "",
84 + chptr->topic_who_is_account ? feature_str(FEAT_HIDDEN_HOST) : "",
88 diff -r 98e2da930476 ircd/s_err.c
89 --- a/ircd/s_err.c Tue Mar 23 14:38:30 2010 +0100
90 +++ b/ircd/s_err.c Tue Mar 23 14:39:07 2010 +0100
93 { RPL_TOPIC, "%s :%s", "332" },
95 - { RPL_TOPICWHOTIME, "%s %s %Tu", "333" },
96 + { RPL_TOPICWHOTIME, "%s %s%s%s %Tu", "333" },
98 { RPL_LISTUSAGE, ":%s", "334" },