/[weechat]/weechat/src/common/command.c
ViewVC logotype

Diff of /weechat/src/common/command.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by kolter, Thu Jun 16 16:38:36 2005 UTC revision 1.57 by flashcode, Sun Jun 19 14:22:11 2005 UTC
# Line 995  weechat_cmd_buffer (int argc, char **arg Line 995  weechat_cmd_buffer (int argc, char **arg
995                                  (ptr_buffer->dcc) ? "DCC" :                                  (ptr_buffer->dcc) ? "DCC" :
996                                      ((BUFFER_IS_SERVER(ptr_buffer)) ? SERVER(ptr_buffer)->name :                                      ((BUFFER_IS_SERVER(ptr_buffer)) ? SERVER(ptr_buffer)->name :
997                                      CHANNEL(ptr_buffer)->name));                                      CHANNEL(ptr_buffer)->name));
998                      if (ptr_buffer->dcc)                      if ((!BUFFER_IS_CHANNEL(ptr_buffer))
999                            && (!BUFFER_IS_PRIVATE(ptr_buffer)))
1000                          gui_printf (NULL, "-");                          gui_printf (NULL, "-");
1001                      else                      else
1002                          gui_printf (NULL, "%d", ptr_buffer->notify_level);                          gui_printf (NULL, "%d", ptr_buffer->notify_level);
# Line 1010  weechat_cmd_buffer (int argc, char **arg Line 1011  weechat_cmd_buffer (int argc, char **arg
1011                  number = strtol (argv[1], &error, 10);                  number = strtol (argv[1], &error, 10);
1012                  if ((error) && (error[0] == '\0'))                  if ((error) && (error[0] == '\0'))
1013                  {                  {
1014                      if ((number < 0) || (number > 3))                      if ((number < NOTIFY_LEVEL_MIN) || (number > NOTIFY_LEVEL_MAX))
1015                      {                      {
1016                          /* invalid highlight level */                          /* invalid highlight level */
1017                          irc_display_prefix (NULL, PREFIX_ERROR);                          irc_display_prefix (NULL, PREFIX_ERROR);
1018                          gui_printf (NULL, _("%s incorrect notify level (must be between 0 and 3)\n"),                          gui_printf (NULL, _("%s incorrect notify level (must be between %d and %d)\n"),
1019                                        WEECHAT_ERROR, NOTIFY_LEVEL_MIN, NOTIFY_LEVEL_MAX);
1020                            return -1;
1021                        }
1022                        if ((!BUFFER_IS_CHANNEL(gui_current_window->buffer))
1023                            && (!BUFFER_IS_PRIVATE(gui_current_window->buffer)))
1024                        {
1025                            /* invalid buffer type (only ok on channel or private) */
1026                            irc_display_prefix (NULL, PREFIX_ERROR);
1027                            gui_printf (NULL, _("%s incorrect buffer for notify (must be channel or private)\n"),
1028                                      WEECHAT_ERROR);                                      WEECHAT_ERROR);
1029                          return -1;                          return -1;
1030                      }                      }
1031                      gui_current_window->buffer->notify_level = number;                      gui_current_window->buffer->notify_level = number;
1032                        channel_set_notify_level (SERVER(gui_current_window->buffer),
1033                                                  CHANNEL(gui_current_window->buffer),
1034                                                  number);
1035                  }                  }
1036                  else                  else
1037                  {                  {
1038                      /* invalid number */                      /* invalid number */
1039                      irc_display_prefix (NULL, PREFIX_ERROR);                      irc_display_prefix (NULL, PREFIX_ERROR);
1040                      gui_printf (NULL, _("%s incorrect notify level (must be between 0 and 3)\n"),                      gui_printf (NULL, _("%s incorrect notify level (must be between %d and %d)\n"),
1041                                  WEECHAT_ERROR);                                  WEECHAT_ERROR, NOTIFY_LEVEL_MIN, NOTIFY_LEVEL_MAX);
1042                      return -1;                      return -1;
1043                  }                  }
1044              }              }
# Line 1841  weechat_cmd_server (int argc, char **arg Line 1854  weechat_cmd_server (int argc, char **arg
1854                                   0, server.address, server.port, server.password,                                   0, server.address, server.port, server.password,
1855                                   server.nick1, server.nick2, server.nick3,                                   server.nick1, server.nick2, server.nick3,
1856                                   server.username, server.realname,                                   server.username, server.realname,
1857                                   server.command, 1, server.autojoin, 1);                                   server.command, 1, server.autojoin, 1, NULL);
1858          if (new_server)          if (new_server)
1859          {          {
1860              irc_display_prefix (NULL, PREFIX_INFO);              irc_display_prefix (NULL, PREFIX_INFO);

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26