summaryrefslogtreecommitdiff
path: root/src/irc/notifylist/notify-commands.c
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2007-10-31 22:58:44 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-10-31 22:58:44 +0000
commit78dad04c7b21342c9b6dddc7ea9f1b34f61e6984 (patch)
tree4432b0b216434973eaa0a24a991daa9e8e74c816 /src/irc/notifylist/notify-commands.c
parentd9782fab84a66a04eb42bb8804236a860b799574 (diff)
downloadirssi-78dad04c7b21342c9b6dddc7ea9f1b34f61e6984.zip
Remove /notify -idle, it can only work with not-nice automated remote whois.
(causes infrequent "server load too heavy" etc) If people really want this, they should write a script. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4632 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/notifylist/notify-commands.c')
-rw-r--r--src/irc/notifylist/notify-commands.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/irc/notifylist/notify-commands.c b/src/irc/notifylist/notify-commands.c
index b8fdc4a6..67076106 100644
--- a/src/irc/notifylist/notify-commands.c
+++ b/src/irc/notifylist/notify-commands.c
@@ -26,13 +26,13 @@
#include "notifylist.h"
-/* SYNTAX: NOTIFY [-away] [-idle [<time>]] <mask> [<ircnets>] */
+/* SYNTAX: NOTIFY [-away] <mask> [<ircnets>] */
static void cmd_notify(gchar *data)
{
GHashTable *optlist;
- char *mask, *ircnets, *idletime;
+ char *mask, *ircnets;
void *free_arg;
- int away_check, idle_check_time;
+ int away_check;
g_return_if_fail(data != NULL);
@@ -41,19 +41,9 @@ static void cmd_notify(gchar *data)
return;
if (*mask == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
- idletime = g_hash_table_lookup(optlist, "idle");
- if (idletime == NULL)
- idle_check_time = 0;
- else if (*idletime == '\0')
- idle_check_time = settings_get_time("notify_idle_time");
- else {
- if (!parse_time_interval(idletime, &idle_check_time))
- cmd_param_error(CMDERR_INVALID_TIME);
- }
-
away_check = g_hash_table_lookup(optlist, "away") != NULL;
notifylist_remove(mask);
- notifylist_add(mask, ircnets, away_check, idle_check_time/1000);
+ notifylist_add(mask, ircnets, away_check);
cmd_params_free(free_arg);
}
@@ -77,11 +67,10 @@ static void cmd_unnotify(const char *data)
void notifylist_commands_init(void)
{
- settings_add_time("misc", "notify_idle_time", "1hour");
command_bind("notify", NULL, (SIGNAL_FUNC) cmd_notify);
command_bind("unnotify", NULL, (SIGNAL_FUNC) cmd_unnotify);
- command_set_options("notify", "-idle away");
+ command_set_options("notify", "away");
}
void notifylist_commands_deinit(void)