]>
jfr.im git - irc/Ozafy/borknet_p10_irc_services.git/blob - core/modules/s/Server.java
3 # BorkNet Services Core
7 # Copyright (C) 2004 Ozafy - ozafy@borknet.org - http://www.borknet.org
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 import borknet_services
.core
.*;
29 * The server communication class of the Q IRC Bot.
30 * @author Ozafy - ozafy@borknet.org - http://www.borknet.org
36 /** the connection to the database */
37 private DBControl dbc
;
44 /** the server's numeric */
45 private String numeric
;
46 /** the bot's numeric */
47 private String corenum
;
48 /** the channel we report to */
49 private String reportchan
;
50 /** our version reply */
51 private String version
;
52 /** counts the number of received pings, used as a timer for channel limits */
53 private int limit
= 0;
59 * Constructs a Server communicator.
60 * @param B The main bot
61 * @param dbc The connection to the database
63 public Server(Core C
, DBControl dbc
, S Bot
)
68 CC
= new Commands(C
,Bot
);
71 numeric
= C
.get_numeric();
72 corenum
= C
.get_corenum();
73 version
= C
.get_version();
74 reportchan
= C
.get_reportchan();
77 public void parse(ArrayList
<String
> params
)
79 String source
= params
.get(0);
80 String command
= params
.get(1);
81 if(command
.equals("P"))
89 * @param me Server it's going to.
90 * @param username numeric of the user talking to me
91 * @param message the message we got from the user
93 public void privmsg(ArrayList
<String
> params
)