2000-09-29 19:59:51 -04:00
|
|
|
/*
|
2001-12-07 10:39:30 -05:00
|
|
|
proxy.c : irc proxy
|
2000-09-29 19:59:51 -04:00
|
|
|
|
2001-12-07 10:39:30 -05:00
|
|
|
Copyright (C) 1999-2001 Timo Sirainen
|
2000-09-29 19:59:51 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2000-11-05 21:29:01 -05:00
|
|
|
#include "module.h"
|
2001-07-25 16:07:10 -04:00
|
|
|
#include "signals.h"
|
2000-11-05 21:29:01 -05:00
|
|
|
#include "settings.h"
|
2000-09-29 19:59:51 -04:00
|
|
|
#include "levels.h"
|
|
|
|
|
2001-07-13 09:09:58 -04:00
|
|
|
void irc_proxy_init(void)
|
2000-09-29 19:59:51 -04:00
|
|
|
{
|
2000-11-05 21:29:01 -05:00
|
|
|
settings_add_str("irssiproxy", "irssiproxy_ports", "");
|
|
|
|
settings_add_str("irssiproxy", "irssiproxy_password", "");
|
2002-06-06 16:14:31 -04:00
|
|
|
settings_add_str("irssiproxy", "irssiproxy_bind", "");
|
2000-11-05 21:29:01 -05:00
|
|
|
|
|
|
|
if (*settings_get_str("irssiproxy_password") == '\0') {
|
|
|
|
/* no password - bad idea! */
|
2001-07-13 09:09:58 -04:00
|
|
|
signal_emit("gui dialog", 2, "warning",
|
|
|
|
"Warning!! Password not specified, everyone can "
|
|
|
|
"use this proxy! Use /set irssiproxy_password "
|
|
|
|
"<password> to set it");
|
2000-11-05 21:29:01 -05:00
|
|
|
}
|
|
|
|
if (*settings_get_str("irssiproxy_ports") == '\0') {
|
2001-07-13 09:09:58 -04:00
|
|
|
signal_emit("gui dialog", 2, "warning",
|
|
|
|
"No proxy ports specified. Use /SET "
|
|
|
|
"irssiproxy_ports <ircnet>=<port> <ircnet2>=<port2> "
|
|
|
|
"... to set them.");
|
2000-09-29 19:59:51 -04:00
|
|
|
}
|
|
|
|
|
2001-12-07 10:39:30 -05:00
|
|
|
proxy_listen_init();
|
2003-11-23 09:25:34 -05:00
|
|
|
settings_check();
|
2001-08-13 20:43:50 -04:00
|
|
|
module_register("proxy", "irc");
|
|
|
|
}
|
|
|
|
|
|
|
|
void irc_proxy_deinit(void)
|
|
|
|
{
|
2001-12-07 10:39:30 -05:00
|
|
|
proxy_listen_deinit();
|
2000-09-29 19:59:51 -04:00
|
|
|
}
|