summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-04-29 10:25:01 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2008-04-29 10:25:01 +0000
commit1397cfdcd33c6c5cdc2b2afec137d4ee38d5e01f (patch)
tree276d971a06b807b5ded6c8eea25bc90edcd34db4 /src/protocol
parentb4d51711c9aed379928dec7999f2c4202571e282 (diff)
BUILD : 1.7.21 (1392) BUGS : NOTES : <Hal9000> fixes a potential crash in channels.c and does handle the TS on incoming FMODE in inspircd.11
git-svn-id: svn://svn.anope.org/anope/trunk@1392 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1107 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/inspircd11.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 6203072b7..bf96d8b21 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -667,11 +667,23 @@ int anope_event_fmode(char *source, int ac, char **av)
{
char *newav[25];
int n, o;
+ Channel *c;
/* :source FMODE #test 12345678 +nto foo */
if (ac < 3)
return MOD_CONT;
+ /* Checking the TS for validity to avoid desyncs */
+ c = findchan(av[0]);
+ if (c->creation_time > strtol(av[1], NULL, 10)) {
+ /* Our TS is bigger, we should lower it */
+ c->creation_time = strtol(av[1], NULL, 10);
+ } else if (c->creation_time < strtol(av[1], NULL, 10)) {
+ /* The TS we got is bigger, we should ignore the message. */
+ return MOD_CONT;
+ }
+
+ /* TS's are equal now, so we can proceed with parsing */
n = o = 0;
while (n < ac) {
if (n != 1) {