]>
jfr.im git - irc/evilnet/mod.chanfix.git/blob - sqlChanOp.cc
4 * Author: Matthias Crauwels <ultimate_@wol.be>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
33 #include "sqlChanOp.h"
41 sqlChanOp::sqlChanOp(sqlManager
* _myManager
) :
50 myManager
= _myManager
;
53 void sqlChanOp::setAllMembers(dbHandle
* theDB
, int row
)
55 channel
= theDB
->GetValue(row
, 0);
56 account
= theDB
->GetValue(row
, 1);
57 nickUserHost
= theDB
->GetValue(row
, 2);
58 ts_firstopped
= atoi(theDB
->GetValue(row
, 3));
59 ts_lastopped
= atoi(theDB
->GetValue(row
, 4));
60 day
[0] = atoi(theDB
->GetValue(row
, 5));
61 day
[1] = atoi(theDB
->GetValue(row
, 6));
62 day
[2] = atoi(theDB
->GetValue(row
, 7));
63 day
[3] = atoi(theDB
->GetValue(row
, 8));
64 day
[4] = atoi(theDB
->GetValue(row
, 9));
65 day
[5] = atoi(theDB
->GetValue(row
, 10));
66 day
[6] = atoi(theDB
->GetValue(row
, 11));
67 day
[7] = atoi(theDB
->GetValue(row
, 12));
68 day
[8] = atoi(theDB
->GetValue(row
, 13));
69 day
[9] = atoi(theDB
->GetValue(row
, 14));
70 day
[10] = atoi(theDB
->GetValue(row
, 15));
71 day
[11] = atoi(theDB
->GetValue(row
, 16));
72 day
[12] = atoi(theDB
->GetValue(row
, 17));
73 day
[13] = atoi(theDB
->GetValue(row
, 18));
77 void sqlChanOp::calcTotalPoints()
81 for (i
= 0; i
< DAYSAMPLES
; i
++) {
86 sqlChanOp::~sqlChanOp()
88 // No heap space allocated
93 } // namespace gnuworld