diff options
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/channels.c | 17 | ||||
-rw-r--r-- | version.log | 6 |
3 files changed, 20 insertions, 4 deletions
@@ -1,6 +1,7 @@ Anope Version S V N ------------------- Provided by Anope Dev. <dev@anope.org> - 2005 +05/13 F Long hosts got cut off when setting topic and host was recorded. [#377] 05/12 F NSListOpersOnly works correctly. [#375] 05/12 F Using variable for EVENT_PART_CHANNEL after freeing it. [#374] 05/11 F Unable to make when using an old shell. [#369] diff --git a/src/channels.c b/src/channels.c index f5e99ffa9..342c55a11 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1140,6 +1140,7 @@ void do_topic(const char *source, int ac, char **av) ChannelInfo *ci; int ts; time_t topic_time; + char *topicsetter; if (ircd->sjb64) { ts = base64dects(av[2]); @@ -1165,17 +1166,26 @@ void do_topic(const char *source, int ac, char **av) ci = c->ci; + /* For Unreal, cut off the ! and any futher part of the topic setter. + * This way, nick!ident@host setters will only show the nick. -GD + */ + topicsetter = myStrGetToken(av[1], '!', 0); + /* If the current topic we have matches the last known topic for this * channel exactly, there's no need to update anything and we can as * well just return silently without updating anything. -GD */ if ((ac > 3) && *av[3] && ci && ci->last_topic && (strcmp(av[3], ci->last_topic) == 0) - && (strcmp(av[1], ci->last_topic_setter) == 0)) + && (strcmp(topicsetter, ci->last_topic_setter) == 0)) { + free(topicsetter); return; + } - if (check_topiclock(c, topic_time)) + if (check_topiclock(c, topic_time)) { + free(topicsetter); return; + } if (c->topic) { free(c->topic); @@ -1185,8 +1195,9 @@ void do_topic(const char *source, int ac, char **av) c->topic = sstrdup(av[3]); } - strscpy(c->topic_setter, av[1], sizeof(c->topic_setter)); + strscpy(c->topic_setter, topicsetter, sizeof(c->topic_setter)); c->topic_time = topic_time; + free(topicsetter); record_topic(av[0]); diff --git a/version.log b/version.log index 8f970d77d..fccca5ebd 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="9" -VERSION_BUILD="793" +VERSION_BUILD="794" # $Log$ # +# BUILD : 1.7.9 (794) +# BUGS : 377 +# NOTES : Removed any ! and further from topicsetters, since Unreal sometimes sends a nick!user@host topicsetter instead of just nick +# # BUILD : 1.7.9 (793) # BUGS : 378 # NOTES : Applied patch |