{
GSList *list = sess_list;
char *reason = word_eol[2];
- int lines;
if (strcasecmp (reason, "HISTORY") == 0)
{
return TRUE;
}
- if (reason[0] != '-' && !isdigit (reason[0]))
+ if (reason[0] != '-' && !isdigit (reason[0]) && reason[0] != 0)
return FALSE;
fe_text_clear (sess, atoi (reason));
int i;
int type = 0;
int quiet = 0;
+ char *mask;
if (!*word[2])
{
{
if (type == 0)
return FALSE;
- i = ignore_add (word[2], type);
+
+ mask = word[2];
+ if (strchr (mask, '?') == NULL &&
+ strchr (mask, '*') == NULL &&
+ userlist_find (sess, mask))
+ {
+ mask = tbuf;
+ snprintf (tbuf, TBUFSIZE, "%s!*@*", word[2]);
+ }
+
+ i = ignore_add (mask, type);
if (quiet)
return TRUE;
switch (i)
{
case 1:
- EMIT_SIGNAL (XP_TE_IGNOREADD, sess, word[2], NULL, NULL, NULL, 0);
+ EMIT_SIGNAL (XP_TE_IGNOREADD, sess, mask, NULL, NULL, NULL, 0);
break;
case 2: /* old ignore changed */
- EMIT_SIGNAL (XP_TE_IGNORECHANGE, sess, word[2], NULL, NULL,
- NULL, 0);
+ EMIT_SIGNAL (XP_TE_IGNORECHANGE, sess, mask, NULL, NULL, NULL, 0);
}
return TRUE;
}
return TRUE;
}
- if (strcmp (net, "ASK") == 0)
+ if (net && strcmp (net, "ASK") == 0)
fe_notify_ask (word[i], NULL);
else
{
handle_say (session *sess, char *text, int check_spch)
{
struct DCC *dcc;
- char *word[PDIWORDS];
- char *word_eol[PDIWORDS];
+ char *word[PDIWORDS+1];
+ char *word_eol[PDIWORDS+1];
char pdibuf_static[1024];
char newcmd_static[1024];
char *pdibuf = pdibuf_static;
if (check_spch && prefs.perc_color)
check_special_chars (text, prefs.perc_ascii);
+ /* Python relies on this */
+ word[PDIWORDS] = NULL;
+ word_eol[PDIWORDS] = NULL;
+
/* split the text into words and word_eol */
process_data_init (pdibuf, text, word, word_eol, TRUE, FALSE);
case 263: /*Server load is temporarily too heavy */
if (fe_is_chanwindow (sess->server))
+ {
fe_chan_list_end (sess->server);
+ fe_message (word_eol[5] + 1, FE_MSG_ERROR);
+ }
goto def;
case 290: /* CAPAB reply */
{
session *sess, *tmp;
char *type, *text;
- char *word[PDIWORDS];
- char *word_eol[PDIWORDS];
+ char *word[PDIWORDS+1];
+ char *word_eol[PDIWORDS+1];
char pdibuf_static[522]; /* 1 line can potentially be 512*6 in utf8 */
char *pdibuf = pdibuf_static;
sess = serv->front_session;
+ /* Python relies on this */
+ word[PDIWORDS] = NULL;
+ word_eol[PDIWORDS] = NULL;
+
if (buf[0] == ':')
{
/* split line into words and words_to_end_of_line */