~ubuntu-branches/ubuntu/lucid/inspircd/lucid-security

« back to all changes in this revision

Viewing changes to src/modules/extra/m_ziplink.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bradley Smith
  • Date: 2008-12-15 20:23:01 UTC
  • mfrom: (3.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20081215202301-headkk1nadqum8g9
01_fix_config_reload.dpatch - Fix crash on config reload.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
                ServerInstance->PublishInterface("InspSocketHook", this);
154
154
 
155
155
                total_out_compressed = total_in_compressed = 0;
156
 
                total_out_uncompressed = total_out_uncompressed = 0;
 
156
                total_out_uncompressed = total_in_uncompressed = 0;
157
157
        }
158
158
 
159
159
        virtual ~ModuleZLib()
231
231
                         * (we dont count 64 bit ints because not all systems have 64 bit ints, and floats
232
232
                         * can still hold more.
233
233
                         */
234
 
                        float outbound_r = 100 - ((total_out_compressed / (total_out_uncompressed + 0.001)) * 100);
235
 
                        float inbound_r = 100 - ((total_in_compressed / (total_in_uncompressed + 0.001)) * 100);
 
234
                        float outbound_r = (total_out_compressed / (total_out_uncompressed + 0.001)) * 100;
 
235
                        float inbound_r = (total_in_compressed / (total_in_uncompressed + 0.001)) * 100;
236
236
 
237
237
                        float total_compressed = total_in_compressed + total_out_compressed;
238
238
                        float total_uncompressed = total_in_uncompressed + total_out_uncompressed;
239
239
 
240
 
                        float total_r = 100 - ((total_compressed / (total_uncompressed + 0.001)) * 100);
 
240
                        float total_r = (total_compressed / (total_uncompressed + 0.001)) * 100;
241
241
 
242
242
                        char outbound_ratio[MAXBUF], inbound_ratio[MAXBUF], combined_ratio[MAXBUF];
243
243