diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 4 | ||||
-rw-r--r-- | src/protocol/inspircd11.c | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c index 19d29a727..aec70dfe8 100644 --- a/src/channels.c +++ b/src/channels.c @@ -785,8 +785,8 @@ void do_sjoin(const char *source, int ac, char **av) for (cu = c->users; cu; cu = cu->next) { /* XXX */ cumodes[0] = "-ov"; - cumodes[1] = user->nick; - cumodes[2] = user->nick; + cumodes[1] = cu->user->nick; + cumodes[2] = cu->user->nick; chan_set_modes(source, c, 3, cumodes, 2); } if (c->ci && c->ci->bi) { 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) { |