diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-05-13 14:57:15 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-05-13 14:57:15 +0000 |
commit | f50b00cdb6b4bcccfea510ea4f807797aca20349 (patch) | |
tree | 46abe11a7c6b2534d19492b77103ae0987b9f80a /src | |
parent | 532b7f2e14d900ee7a9909a2d44622ed6b1e6539 (diff) |
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
git-svn-id: svn://svn.anope.org/anope/trunk@794 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@553 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 17 |
1 files changed, 14 insertions, 3 deletions
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]); |