From 55e822ce85f88b5a8919cd9cc305462dd03c99a3 Mon Sep 17 00:00:00 2001 From: om Date: Wed, 8 Mar 2006 12:43:07 +0000 Subject: Stupid, retarded, idiotic bug here where any PONG after the first one gets you kicked. Never picked it up cause with Xchat's lag meter the server never actually PINGed me :" git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3550 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_conn_waitpong.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index a97e7f72c..83958ee2d 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -82,16 +82,20 @@ class ModuleWaitPong : public Module { char* pingrpl = user->GetExt("waitpong_pingstr"); - if(pingrpl && (strcmp(pingrpl, parameters[0]) == 0)) - { - delete pingrpl; - user->Shrink("waitpong_pingstr"); - return 1; - } - else if(killonbadreply) + if(pingrpl) { - Srv->QuitUser(user, "Incorrect ping reply for registration"); - return 1; + if(strcmp(pingrpl, parameters[0]) == 0) + { + delete pingrpl; + user->Shrink("waitpong_pingstr"); + return 1; + } + else + { + if(killonbadreply) + Srv->QuitUser(user, "Incorrect ping reply for registration"); + return 1; + } } } -- cgit v1.2.3