* Reset idle time when AWAY is used in auto-away (#121)
+ * Fix crash when using /CTRLPROXY without arguments
+
INTERNALS
* Use GIOChannels for reading the motd.
gboolean admin_process_command(struct client *c, struct line *l, int cmdoffset)
{
int i;
- char *tmp = g_strdup(l->args[cmdoffset]);
+ char *tmp;
gboolean ret;
struct admin_handle ah;
+ if (l->args[cmdoffset] == NULL) {
+ client_send_response(c, ERR_NEEDMOREPARAMS, l->args[0], "Not enough parameters", NULL);
+ return TRUE;
+ }
+
+ tmp = g_strdup(l->args[cmdoffset]);
+
/* Add everything after l->args[cmdoffset] to tmp */
for(i = cmdoffset+1; l->args[i]; i++) {
char *oldtmp = tmp;