diff --git a/config b/config index 6ca31901..98fb3c65 100644 --- a/config +++ b/config @@ -4,8 +4,7 @@ setupservers = ( {server = "irc.undernet.net"; ircnet = Undernet; port = 6667; autoconnect = No;}, {server = "irc.dal.net"; ircnet = DALNet; port = 6667; autoconnect = No;}, {server = "irc.openprojects.net"; ircnet = OPN; port = 6667; autoconnect = No;}, - {server = "irc.ptlink.net"; ircnet = PTlink; port = 6667; autoconnect = No;}, - {server = "irc.multichat.org"; ircnet = Multichat; port = 6667; autoconnect = No;} + {server = "irc.ptlink.net"; ircnet = PTlink; port = 6667; autoconnect = No;} ); ircnets = ( @@ -22,6 +21,11 @@ channels = ( name = "#irssi"; ircnet = ircnet; autojoin = No; + }, + { + name = "#irssi"; + ircnet = efnet; + autojoin = No; } ); aliases = { @@ -47,12 +51,16 @@ aliases = { K = "kick"; KB = "kickban"; KN = "knockout"; + BANS = "ban"; B = "ban"; + MUB = "unban *"; UB = "unban"; IG = "ignore"; UNIG = "unignore"; SB = "scrollback"; UMODE = "mode $N"; + WC = "window close"; + WN = "window new"; }; popups = ( {label = "Whois"; command = "/whois %s";}, diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 4e57aa45..bc6097cf 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -323,14 +323,18 @@ static void cmd_nctcp(const char *data, IRC_SERVER_REC *server) g_free(params); } -static void cmd_banstat(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) +static void cmd_ban(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) { CHANNEL_REC *cur_channel, *channel; GSList *tmp; g_return_if_fail(data != NULL); + if (*data == '\0') + return; /* setting ban - don't handle here */ + if (server == NULL || !server->connected) cmd_return_error(CMDERR_NOT_CONNECTED); + /* display bans */ cur_channel = irc_item_channel(item); if (cur_channel == NULL) cmd_return_error(CMDERR_NOT_JOINED); @@ -377,6 +381,8 @@ static void cmd_banstat(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *it printformat(server, channel->name, MSGLEVEL_CRAP, IRCTXT_EBANLIST, channel->name, rec->ban, rec->setby, (gint) (time(NULL)-rec->time)); } + + signal_stop(); } static void cmd_invitelist(const char *data, IRC_SERVER_REC *server, WI_IRC_REC *item) @@ -510,7 +516,7 @@ void fe_irc_commands_init(void) command_bind("action", NULL, (SIGNAL_FUNC) cmd_action); command_bind("ctcp", NULL, (SIGNAL_FUNC) cmd_ctcp); command_bind("nctcp", NULL, (SIGNAL_FUNC) cmd_nctcp); - command_bind("banstat", NULL, (SIGNAL_FUNC) cmd_banstat); + command_bind("ban", NULL, (SIGNAL_FUNC) cmd_ban); command_bind("invitelist", NULL, (SIGNAL_FUNC) cmd_invitelist); command_bind("join", NULL, (SIGNAL_FUNC) cmd_join); command_bind("channel", NULL, (SIGNAL_FUNC) cmd_channel); @@ -531,7 +537,7 @@ void fe_irc_commands_deinit(void) command_unbind("action", (SIGNAL_FUNC) cmd_action); command_unbind("ctcp", (SIGNAL_FUNC) cmd_ctcp); command_unbind("nctcp", (SIGNAL_FUNC) cmd_nctcp); - command_unbind("banstat", (SIGNAL_FUNC) cmd_banstat); + command_unbind("ban", (SIGNAL_FUNC) cmd_ban); command_unbind("invitelist", (SIGNAL_FUNC) cmd_invitelist); command_unbind("join", (SIGNAL_FUNC) cmd_join); command_unbind("channel", (SIGNAL_FUNC) cmd_channel);