summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-03-21 16:10:05 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-03-21 16:10:05 +0000
commita53f209c7ff5935426b7fc50815a32efaba5a530 (patch)
tree9c81b2d1d022b237b82436aa599efb59bc451a8b /src
parent28dd48200686b58b2f01f2094dba3093297c5935 (diff)
BUILD : 1.7.8 (635) BUGS : NOTES : Topics should be only updated when really needed during bursts now (on IRCDs that support it)
git-svn-id: svn://svn.anope.org/anope/trunk@635 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@483 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/bahamut.c1
-rw-r--r--src/channels.c35
-rw-r--r--src/chanserv.c3
-rw-r--r--src/hybrid.c1
-rw-r--r--src/plexus.c1
-rw-r--r--src/rageircd.c1
-rw-r--r--src/shadowircd.c1
-rw-r--r--src/solidircd.c1
-rw-r--r--src/ultimate3.c1
-rw-r--r--src/unreal32.c1
-rw-r--r--src/viagra.c1
11 files changed, 44 insertions, 3 deletions
diff --git a/src/bahamut.c b/src/bahamut.c
index 28b8ec79a..dca254bff 100644
--- a/src/bahamut.c
+++ b/src/bahamut.c
@@ -1623,6 +1623,7 @@ int anope_event_burst(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
}
return MOD_CONT;
}
diff --git a/src/channels.c b/src/channels.c
index 24f2f639e..bd1a5e913 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -736,10 +736,13 @@ void do_sjoin(const char *source, int ac, char **av)
{
Channel *c;
User *user;
+ Server *serv;
char *s, *end, cubuf[7], *end2, *cumodes[6];
int is_sqlined = 0;
int ts = 0;
+ serv = findserver(servlist, source);
+
if (ircd->sjb64) {
ts = base64dects(av[0]);
} else {
@@ -838,6 +841,8 @@ void do_sjoin(const char *source, int ac, char **av)
cumodes, 1);
}
+ if (c->ci && (!serv || is_sync(serv)))
+ restore_topic(c->name);
chan_set_correct_modes(user, c);
}
}
@@ -911,6 +916,8 @@ void do_sjoin(const char *source, int ac, char **av)
cumodes, 1);
}
+ if (c->ci && (!serv || is_sync(serv)))
+ restore_topic(c->name);
chan_set_correct_modes(user, c);
}
}
@@ -982,6 +989,8 @@ void do_sjoin(const char *source, int ac, char **av)
cumodes, 1);
}
+ if (c->ci && (!serv || is_sync(serv)))
+ restore_topic(c->name);
chan_set_correct_modes(user, c);
}
}
@@ -1023,6 +1032,8 @@ void do_sjoin(const char *source, int ac, char **av)
} else {
c = join_user_update(user, c, av[1]);
c->creation_time = ts;
+ if (c->ci && (!serv || is_sync(serv)))
+ restore_topic(c->name);
chan_set_correct_modes(user, c);
}
}
@@ -1126,6 +1137,9 @@ void do_topic(const char *source, int ac, char **av)
return;
}
+ /* We can be sure that the topic will be in sync here -GD */
+ c->topic_sync = 1;
+
if (check_topiclock(c, topic_time))
return;
@@ -1340,7 +1354,7 @@ void chan_adduser2(User * user, Channel * c)
* to has synced, or we'll get greet-floods when the net
* recovers from a netsplit. -GD
*/
- if (is_sync(user->server) == 1) {
+ if (is_sync(user->server)) {
anope_cmd_privmsg(c->ci->bi->nick, c->name, "[%s] %s",
user->na->nick, user->na->nc->greet);
c->ci->bi->lastmsg = time(NULL);
@@ -1378,8 +1392,10 @@ Channel *chan_create(char *chan)
/* Restore locked modes and saved topic */
if (c->ci) {
check_modes(c);
- restore_topic(chan);
stick_all(c->ci);
+ c->topic_sync = 0;
+ } else {
+ c->topic_sync = 1;
}
return c;
@@ -1692,3 +1708,18 @@ void do_mass_mode(char *modes)
}
/*************************************************************************/
+
+void restore_unsynced_topics(void)
+{
+ Channel *c;
+ int i;
+
+ for (i = 0; i < 1024; i++) {
+ for (c = chanlist[i]; c; c = c->next) {
+ if (!(c->topic_sync))
+ restore_topic(c->name);
+ }
+ }
+}
+
+/*************************************************************************/
diff --git a/src/chanserv.c b/src/chanserv.c
index 26c3a0afe..d479888a8 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1764,6 +1764,8 @@ void restore_topic(char *chan)
if (!c || !(ci = c->ci))
return;
+ /* We can be sure that the topic will be in sync when we return -GD */
+ c->topic_sync = 1;
if (!(ci->flags & CI_KEEPTOPIC)) {
/* We need to reset the topic here, since it's currently empty and
* should be updated with a TOPIC from the IRCd soon. -GD
@@ -1771,7 +1773,6 @@ void restore_topic(char *chan)
ci->last_topic = NULL;
strscpy(ci->last_topic_setter, whosends(ci), NICKMAX);
ci->last_topic_time = time(NULL);
- /* And we still return... -GD */
return;
}
if (c->topic)
diff --git a/src/hybrid.c b/src/hybrid.c
index 55c1cf69b..fb9a87254 100644
--- a/src/hybrid.c
+++ b/src/hybrid.c
@@ -937,6 +937,7 @@ int anope_event_eob(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
return MOD_CONT;
}
diff --git a/src/plexus.c b/src/plexus.c
index e008f5018..7b5c54f2f 100644
--- a/src/plexus.c
+++ b/src/plexus.c
@@ -1019,6 +1019,7 @@ int anope_event_eob(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
return MOD_CONT;
}
diff --git a/src/rageircd.c b/src/rageircd.c
index 196243ca3..b638d210c 100644
--- a/src/rageircd.c
+++ b/src/rageircd.c
@@ -597,6 +597,7 @@ int anope_event_burst(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
}
return MOD_CONT;
}
diff --git a/src/shadowircd.c b/src/shadowircd.c
index cb95db424..e9a74b104 100644
--- a/src/shadowircd.c
+++ b/src/shadowircd.c
@@ -1173,6 +1173,7 @@ int anope_event_eos(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
return MOD_CONT;
}
diff --git a/src/solidircd.c b/src/solidircd.c
index a4bbbb714..3c9567bc7 100644
--- a/src/solidircd.c
+++ b/src/solidircd.c
@@ -1657,6 +1657,7 @@ int anope_event_burst(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
}
return MOD_CONT;
}
diff --git a/src/ultimate3.c b/src/ultimate3.c
index b6a840a48..579d35b36 100644
--- a/src/ultimate3.c
+++ b/src/ultimate3.c
@@ -1750,6 +1750,7 @@ int anope_event_eob(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
}
return MOD_CONT;
}
diff --git a/src/unreal32.c b/src/unreal32.c
index d2051b160..a4b3cdf35 100644
--- a/src/unreal32.c
+++ b/src/unreal32.c
@@ -1578,6 +1578,7 @@ int anope_event_eos(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
return MOD_CONT;
}
diff --git a/src/viagra.c b/src/viagra.c
index 529dfc704..bc3878fd2 100644
--- a/src/viagra.c
+++ b/src/viagra.c
@@ -647,6 +647,7 @@ int anope_event_burst(char *source, int ac, char **av)
s->sync = SSYNC_DONE;
else if (serv_uplink)
serv_uplink->sync = SSYNC_DONE;
+ restore_unsynced_topics();
}
return MOD_CONT;
}