[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: PATCH - make ksirc flood protection less paranoid
From: Neil Stevens <neil () qualityassistant ! com>
Date: 2002-03-29 14:17:10
[Download RAW message or body]
To me it seems highly unlikely that an IRC server itself will flood you
with channel joins. Meanwhile, flood protection is causing me all kinds
of pain when joining channels when I first start up ksirc.
Here's a patch that doesn't count #channels when doing flood protection.
Can I commit this to HEAD and BRANCH?
--
Neil Stevens - neil@qualityassistant.com
"I always cheer up immensely if an attack is particularly wounding
because I think, well, if they attack one personally, it means they
have not a single political argument left." - Margaret Thatcher
["paranoid-flood-fix" (text/x-diff)]
? 2
Index: ksircprocess.cpp
===================================================================
RCS file: /home/kde/kdenetwork/ksirc/ksircprocess.cpp,v
retrieving revision 1.98
diff -u -r1.98 ksircprocess.cpp
--- ksircprocess.cpp 2002/03/16 18:23:20 1.98
+++ ksircprocess.cpp 2002/03/29 14:02:30
@@ -323,7 +323,7 @@
// If AutoCreate windows is on, let's make sure we're not being flooded.
if(ksopts->autoCreateWin == TRUE){
time_t current_time = time(NULL);
- if((current_time - last_window_open) < 5){
+ if(str[0] != '#' && ((current_time - last_window_open) < 5)){
if(number_open > 4 && flood_dlg == FALSE){
flood_dlg = TRUE;
switch(KMessageBox::warningYesNo(0,
@@ -342,7 +342,9 @@
number_open = 0;
}
else{
- number_open++;
+ // Joining channels can't be a flood, can it?
+ if(str[0] != '#')
+ number_open++;
}
flood_dlg = FALSE;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic