Fix bug where you got disconnected if the server sent a 464 numeric
(bad password) that the client wasn't expecting. The most common case is failing a CHALLENGE oper attempt. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@55 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
[Changes 1.2c01 ]
|
[Changes 1.2c01 ]
|
||||||
|
|
||||||
|
* Fix bug where you got disconnected if the server sent a 464 numeric
|
||||||
|
(bad password) that the client wasn't expecting. (caf)
|
||||||
|
|
||||||
* Add /HOP and /DEHOP commands for halfop. (caf)
|
* Add /HOP and /DEHOP commands for halfop. (caf)
|
||||||
|
|
||||||
* Removed "scan" plugin, this functionality is now covered by /SCAN -stat.
|
* Removed "scan" plugin, this functionality is now covered by /SCAN -stat.
|
||||||
|
|||||||
@@ -1130,10 +1130,20 @@ void numbered_command(char *from, int comm, char **ArgList)
|
|||||||
case 464: /* #define ERR_PASSWDMISMATCH 464 */
|
case 464: /* #define ERR_PASSWDMISMATCH 464 */
|
||||||
{
|
{
|
||||||
PasteArgs(ArgList, 0);
|
PasteArgs(ArgList, 0);
|
||||||
|
|
||||||
if (!is_server_open(from_server))
|
if (!is_server_open(from_server))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
flag = do_hook(current_numeric, "%s %s", from, ArgList[0]);
|
flag = do_hook(current_numeric, "%s %s", from, ArgList[0]);
|
||||||
if (oper_command)
|
|
||||||
|
/* If we get this numeric before registering, it means that
|
||||||
|
* our server password was wrong - so reprompt and reconnect.
|
||||||
|
*
|
||||||
|
* However if we're already registered, the server is trying to
|
||||||
|
* tell us something else (usually, OPER password wrong) so just
|
||||||
|
* pass it on to the user.
|
||||||
|
*/
|
||||||
|
if (is_server_connected(from_server))
|
||||||
{
|
{
|
||||||
if (flag)
|
if (flag)
|
||||||
display_msg(from, ArgList);
|
display_msg(from, ArgList);
|
||||||
@@ -1141,7 +1151,7 @@ void numbered_command(char *from, int comm, char **ArgList)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char server_num[8];
|
static char server_num[8];
|
||||||
|
|
||||||
say("Password required for connection to server %s",
|
say("Password required for connection to server %s",
|
||||||
get_server_name(from_server));
|
get_server_name(from_server));
|
||||||
|
|||||||
Reference in New Issue
Block a user