3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
36 printf ("Pick a nick: ");
40 printf ("\nPlease wait ..\n");
42 config
.nick
= strdup (nick
);
47 int init (char *address
, int port
, int flags
)
51 if (!init_net (address
, port
, flags
))
54 config
.server
= address
;
55 config
.server_len
= strlen (address
);
60 if (!commands_init ())
97 printf ("irc: <address> <port> [-6]\nGNU/GPL3 - Coded by ZeXx86\n");
100 int main (int argc
, char **argv
)
111 port
= atoi (argv
[2]);
113 if (!strncmp (argv
[argc
-1], "-6", 2)) {
115 printf ("> IPv6 mode\n");
120 port
= 6667; /* set default port, when user not specify any */
122 printf ("-= IRC Client =-\n");
124 if (!init (argv
[1], port
, proto
)) {
125 printf ("ERROR -> init () failed\n");
136 free (config
.server
);
138 if (config
.channel_len
)
139 free (config
.channel
);