Fixed two places where the client compared the source of a numeric against
get_server_name(from_server) instead of get_server_itsname(from_server) - this meant that if the client had a different idea of the local server name from the server (say, if you used a round-robin to connect), then the client would incorrectly assume the numeric came from a remote server. The symptoms were: * If your local server sent you a "you're not op" type message, BitchX would report the channel had desynched. * If your local server send you a "channel doesn't exist" numeric (eg. if you typed /mode #nosuchchannel to see if it existed), BitchX would not show it. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@71 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
[Changes 1.2c01 ]
|
||||
|
||||
* Fixed two cases where the client was incorrectly deciding that a numeric
|
||||
originated from a remote server rather than the local server - this caused
|
||||
BitchX to falsely report channel desynch and incorrectly hide some
|
||||
numerics. (caf)
|
||||
|
||||
* Fixed $servernum() scripting function, it was returning the wrong server
|
||||
reference in most cases. (caf)
|
||||
|
||||
|
||||
@@ -224,17 +224,17 @@ static int check_server_sync(char *from, char **ArgList)
|
||||
{
|
||||
static char *desync = NULL;
|
||||
|
||||
|
||||
if (!desync || (desync && !wild_match(desync, from)))
|
||||
{
|
||||
if (!wild_match(from, get_server_name(from_server)))
|
||||
/* If we get a "permission denied" type numeric from a _remote_ server,
|
||||
* then it means the network is desyched.
|
||||
*/
|
||||
if (my_stricmp(from, get_server_itsname(from_server)) &&
|
||||
(!desync || my_stricmp(desync, from)))
|
||||
{
|
||||
malloc_strcpy(&desync, from);
|
||||
if (do_hook(DESYNC_MESSAGE_LIST, "%s %s", from, ArgList[0]))
|
||||
put_it("%s", convert_output_format(fget_string_var(FORMAT_DESYNC_FSET), "%s %s %s", update_clock(GET_TIME), ArgList[0], from));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -307,14 +307,11 @@ static void channel_topic(char *from, char **ArgList, int what)
|
||||
static void not_valid_channel(char *from, char **ArgList)
|
||||
{
|
||||
char *channel;
|
||||
char *s;
|
||||
|
||||
|
||||
if (!(channel = ArgList[0]) || !ArgList[1])
|
||||
return;
|
||||
PasteArgs(ArgList, 1);
|
||||
s = get_server_name(from_server);
|
||||
if (!my_strnicmp(s, from, strlen(s)))
|
||||
if (!my_stricmp(from, get_server_itsname(from_server)))
|
||||
{
|
||||
if (strcmp(channel, "*"))
|
||||
remove_channel(channel, from_server);
|
||||
|
||||
Reference in New Issue
Block a user