mirror of
https://github.com/anope/anope.git
synced 2026-07-04 00:23:12 +02:00
BUILD : 1.7.8 (617) BUGS : NOTES : Fixed: [1] Will not set already set channel modes anymore [2] Do not display entrymsg/greet while syncing [3] Sync state for uplink not always set correctly
git-svn-id: svn://svn.anope.org/anope/trunk@617 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@465 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
5d30eeca09
commit
7bdbe05535
@@ -8,6 +8,9 @@ Provided by Anope Dev. <dev@anope.org> - 2005
|
||||
02/13 A Internal Event support, see EVENTS in the doc folder for help [ #00]
|
||||
02/05 A Support for Unreal 3.2 +I channel mode. [ #00]
|
||||
02/03 A Merged anope-win32 branch into the main, now Win32 ready. [ #00]
|
||||
03/12 F Services setting already set channel modes. [ #00]
|
||||
03/12 F Not displaying entrymessage/greets on (re-)sync of uplink anymore.[ #00]
|
||||
03/12 F Sync state for uplink server not being set correctly. [ #00]
|
||||
03/11 F EVENT_BOT_ASSIGN now reports channel name instead of bot nick. [ #00]
|
||||
03/08 F Display of real host instead of vhost on alog(). [ #00]
|
||||
03/07 F tolower/toupper compiler errors on Win32. [ #00]
|
||||
|
||||
+7
-2
@@ -1609,9 +1609,14 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
if (!ac) {
|
||||
/* for future use - start burst */
|
||||
} else {
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+67
-34
@@ -22,6 +22,7 @@ Channel *chanlist[1024];
|
||||
void add_ban(Channel * chan, char *mask);
|
||||
void add_exception(Channel * chan, char *mask);
|
||||
void add_invite(Channel * chan, char *mask);
|
||||
void chan_set_correct_modes(User * user, Channel * c);
|
||||
void chan_adduser2(User * user, Channel * c);
|
||||
Channel *chan_create(char *chan);
|
||||
void chan_delete(Channel * c);
|
||||
@@ -530,6 +531,7 @@ User *nc_on_chan(Channel * c, NickCore * nc)
|
||||
void do_join(const char *source, int ac, char **av)
|
||||
{
|
||||
User *user;
|
||||
Channel *chan;
|
||||
char *s, *t;
|
||||
struct u_chanlist *c, *nextc;
|
||||
|
||||
@@ -571,16 +573,9 @@ void do_join(const char *source, int ac, char **av)
|
||||
if (check_kick(user, s))
|
||||
continue;
|
||||
|
||||
/* chan_adduser(user, s); */
|
||||
join_user_update(user, findchan(s), s);
|
||||
|
||||
|
||||
/* c = scalloc(sizeof(*c), 1);
|
||||
c->next = user->chans;
|
||||
if (user->chans)
|
||||
user->chans->prev = c;
|
||||
user->chans = c;
|
||||
c->chan = findchan(s); */
|
||||
chan = findchan(s);
|
||||
join_user_update(user, chan, s);
|
||||
chan_set_correct_modes(user, chan);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -842,6 +837,8 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
chan_set_modes(source, c, 1 + (end2 - cubuf - 1),
|
||||
cumodes, 1);
|
||||
}
|
||||
|
||||
chan_set_correct_modes(user, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,6 +910,8 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
chan_set_modes(source, c, 1 + (end2 - cubuf - 1),
|
||||
cumodes, 1);
|
||||
}
|
||||
|
||||
chan_set_correct_modes(user, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -982,6 +981,8 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
chan_set_modes(source, c, 1 + (end2 - cubuf - 1),
|
||||
cumodes, 1);
|
||||
}
|
||||
|
||||
chan_set_correct_modes(user, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1022,6 +1023,7 @@ void do_sjoin(const char *source, int ac, char **av)
|
||||
} else {
|
||||
c = join_user_update(user, c, av[1]);
|
||||
c->creation_time = ts;
|
||||
chan_set_correct_modes(user, c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1209,33 +1211,57 @@ void add_invite(Channel * chan, char *mask)
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Set the correct modes for the given user on the given channel. Ignored
|
||||
* users won't get any modes set this way. -GD
|
||||
*/
|
||||
|
||||
void chan_set_correct_modes(User * user, Channel * c)
|
||||
{
|
||||
char *chan;
|
||||
int status;
|
||||
|
||||
chan = c->name;
|
||||
|
||||
if (get_ignore(user->nick) == NULL) {
|
||||
status = chan_get_user_status(c, user);
|
||||
/* This looks dirty. For every mode we first check if the IRCd
|
||||
* supports it. If true, we check if the user already has the
|
||||
* mode. If both are true, we check if they should get the mode,
|
||||
* which sends the mode to the uplink and returns true. If the
|
||||
* mode is sent, we internally update to finish it off. -GD
|
||||
*/
|
||||
if (ircd->owner && !(status & CUS_OWNER)) {
|
||||
if (check_should_owner(user, chan))
|
||||
chan_set_user_status(c, user, CUS_OWNER | CUS_OP);
|
||||
} else if (ircd->protect && !(status & CUS_PROTECT)) {
|
||||
if (check_should_protect(user, chan))
|
||||
chan_set_user_status(c, user, CUS_PROTECT | CUS_OP);
|
||||
} else if (ircd->admin && !(status & CUS_PROTECT)) {
|
||||
if (check_should_protect(user, chan))
|
||||
chan_set_user_status(c, user, CUS_PROTECT | CUS_OP);
|
||||
} else if (!(status & CUS_OP)) {
|
||||
if (check_should_op(user, chan))
|
||||
chan_set_user_status(c, user, CUS_OP);
|
||||
} else if (ircd->halfop && !(status & CUS_HALFOP)) {
|
||||
if (check_should_halfop(user, chan))
|
||||
chan_set_user_status(c, user, CUS_HALFOP);
|
||||
} else if (!(status & CUS_VOICE)) {
|
||||
if (check_should_voice(user, chan))
|
||||
chan_set_user_status(c, user, CUS_VOICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/* Add/remove a user to/from a channel, creating or deleting the channel as
|
||||
* necessary. If creating the channel, restore mode lock and topic as
|
||||
* necessary. Also check for auto-opping and auto-voicing.
|
||||
* Modified, so ignored users won't get any status via services -certus */
|
||||
|
||||
*/
|
||||
|
||||
void chan_adduser2(User * user, Channel * c)
|
||||
{
|
||||
struct c_userlist *u;
|
||||
char *chan = c->name;
|
||||
|
||||
if (get_ignore(user->nick) == NULL) {
|
||||
|
||||
if (ircd->owner && check_should_owner(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_OWNER | CUS_OP);
|
||||
} else if (ircd->protect && check_should_protect(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_PROTECT | CUS_OP);
|
||||
} else if (ircd->admin && check_should_protect(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_PROTECT | CUS_OP);
|
||||
} else if (check_should_op(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_OP);
|
||||
} else if (ircd->halfop && check_should_halfop(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_HALFOP);
|
||||
} else if (check_should_voice(user, chan)) {
|
||||
chan_set_user_status(c, user, CUS_VOICE);
|
||||
}
|
||||
}
|
||||
|
||||
u = scalloc(sizeof(struct c_userlist), 1);
|
||||
u->next = c->users;
|
||||
@@ -1257,7 +1283,8 @@ void chan_adduser2(User * user, Channel * c)
|
||||
}
|
||||
}
|
||||
/* Added channelname to entrymsg - 30.03.2004, Certus */
|
||||
if (c->ci && c->ci->entry_message)
|
||||
/* Also, don't send the entrymsg when bursting -GD */
|
||||
if (c->ci && c->ci->entry_message && (me_server->sync == 1))
|
||||
notice_user(whosends(c->ci), user, "[%s] %s", c->name,
|
||||
c->ci->entry_message);
|
||||
}
|
||||
@@ -1274,9 +1301,15 @@ void chan_adduser2(User * user, Channel * c)
|
||||
if (c->usercount >= BSMinUsers && (c->ci->botflags & BS_GREET)
|
||||
&& user->na && user->na->nc->greet
|
||||
&& check_access(user, c->ci, CA_GREET)) {
|
||||
anope_cmd_privmsg(c->ci->bi->nick, c->name, "[%s] %s",
|
||||
user->na->nick, user->na->nc->greet);
|
||||
c->ci->bi->lastmsg = time(NULL);
|
||||
/* Only display the greet if the main uplink we're connected
|
||||
* to has synced, or we'll get greet-floods when the net
|
||||
* recovers from a netsplit. -GD
|
||||
*/
|
||||
if (me_server->sync == 1) {
|
||||
anope_cmd_privmsg(c->ci->bi->nick, c->name, "[%s] %s",
|
||||
user->na->nick, user->na->nc->greet);
|
||||
c->ci->bi->lastmsg = time(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-2
@@ -926,9 +926,15 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
{
|
||||
Server *s;
|
||||
s = findserver(servlist, source);
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+8
-2
@@ -1008,9 +1008,15 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
{
|
||||
Server *s;
|
||||
s = findserver(servlist, source);
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -586,9 +586,14 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
if (ac > 1) {
|
||||
/* for future use - start burst */
|
||||
} else {
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include "services.h"
|
||||
|
||||
Server *servlist = NULL;
|
||||
Server *me_server = NULL;
|
||||
Server *me_server = NULL; /* Our uplink server */
|
||||
uint32 uplink_capab;
|
||||
char *uplink;
|
||||
char *TS6UPLINK;
|
||||
|
||||
+8
-2
@@ -1140,9 +1140,15 @@ int anope_event_eos(char *source, int ac, char **av)
|
||||
{
|
||||
Server *s;
|
||||
s = findserver_uid(servlist, source);
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -1646,9 +1646,14 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
if (!ac) {
|
||||
/* for future use - start burst */
|
||||
} else {
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+7
-2
@@ -1739,9 +1739,14 @@ int anope_event_eob(char *source, int ac, char **av)
|
||||
|
||||
if (ac == 1) {
|
||||
s = findserver(servlist, av[0]);
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+7
-2
@@ -1567,9 +1567,14 @@ int anope_event_eos(char *source, int ac, char **av)
|
||||
{
|
||||
Server *s;
|
||||
s = findserver(servlist, source);
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -638,9 +638,14 @@ int anope_event_burst(char *source, int ac, char **av)
|
||||
if (!ac) {
|
||||
/* for future use - start burst */
|
||||
} else {
|
||||
if (s) {
|
||||
/* If we found a server with the given source, that one just
|
||||
* finished bursting. If there was no source, then our uplink
|
||||
* server finished bursting. -GD
|
||||
*/
|
||||
if (s)
|
||||
s->sync = 1;
|
||||
}
|
||||
else
|
||||
me_server->sync = 1;
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
+5
-1
@@ -8,10 +8,14 @@
|
||||
VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="8"
|
||||
VERSION_BUILD="616"
|
||||
VERSION_BUILD="617"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.8 (617)
|
||||
# BUGS :
|
||||
# NOTES : Fixed: [1] Will not set already set channel modes anymore [2] Do not display entrymsg/greet while syncing [3] Sync state for uplink not always set correctly
|
||||
#
|
||||
# BUILD : 1.7.8 (616)
|
||||
# BUGS :
|
||||
# NOTES : Added EVENT_DB_BACKUP and changed EVENT_BOT_ASSIGN to pass channel name instead of bot nick as argument
|
||||
|
||||
Reference in New Issue
Block a user