/[weechat]/weechat/src/plugins/python/wee-python.c
ViewVC logotype

Diff of /weechat/src/plugins/python/wee-python.c

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

revision 1.6 by flashcode, Sun Aug 21 16:32:48 2005 UTC revision 1.7 by flashcode, Sat Sep 3 12:37:20 2005 UTC
# Line 66  wee_python_register (PyObject *self, PyO Line 66  wee_python_register (PyObject *self, PyO
66      for (ptr_python_script = python_scripts; ptr_python_script;      for (ptr_python_script = python_scripts; ptr_python_script;
67           ptr_python_script = ptr_python_script->next_script)           ptr_python_script = ptr_python_script->next_script)
68      {      {
69          if (strcasecmp (ptr_python_script->name, name) == 0)          if (ascii_strcasecmp (ptr_python_script->name, name) == 0)
70          {          {
71              python_script_found = ptr_python_script;              python_script_found = ptr_python_script;
72              break;              break;
# Line 321  wee_python_get_info (PyObject *self, PyO Line 321  wee_python_get_info (PyObject *self, PyO
321      {      {
322          for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)          for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server)
323          {          {
324              if (strcasecmp (ptr_server->name, server) == 0)              if (ascii_strcasecmp (ptr_server->name, server) == 0)
325                  break;                  break;
326          }          }
327          if (!ptr_server)          if (!ptr_server)
# Line 336  wee_python_get_info (PyObject *self, PyO Line 336  wee_python_get_info (PyObject *self, PyO
336            
337      if (ptr_server && arg)      if (ptr_server && arg)
338      {      {
339          if ( (strcasecmp (arg, "0") == 0) || (strcasecmp (arg, "version") == 0) )          if ( (ascii_strcasecmp (arg, "0") == 0) || (ascii_strcasecmp (arg, "version") == 0) )
340          {          {
341              info = PACKAGE_STRING;              info = PACKAGE_STRING;
342          }          }
343          else if ( (strcasecmp (arg, "1") == 0) || (strcasecmp (arg, "nick") == 0) )          else if ( (ascii_strcasecmp (arg, "1") == 0) || (ascii_strcasecmp (arg, "nick") == 0) )
344          {          {
345              if (ptr_server->nick)              if (ptr_server->nick)
346                  info = ptr_server->nick;                  info = ptr_server->nick;
347          }          }
348          else if ( (strcasecmp (arg, "2") == 0) || (strcasecmp (arg, "channel") == 0) )          else if ( (ascii_strcasecmp (arg, "2") == 0) || (ascii_strcasecmp (arg, "channel") == 0) )
349          {          {
350              if (BUFFER_IS_CHANNEL (gui_current_window->buffer))              if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
351                  info = CHANNEL (gui_current_window->buffer)->name;                  info = CHANNEL (gui_current_window->buffer)->name;
352          }          }
353          else if ( (strcasecmp (arg, "3") == 0) || (strcasecmp (arg, "server") == 0) )          else if ( (ascii_strcasecmp (arg, "3") == 0) || (ascii_strcasecmp (arg, "server") == 0) )
354          {          {
355              if (ptr_server->name)              if (ptr_server->name)
356                  info = ptr_server->name;                  info = ptr_server->name;
357          }          }
358          else if ( (strcasecmp (arg, "4") == 0) || (strcasecmp (arg, "weechatdir") == 0) )          else if ( (ascii_strcasecmp (arg, "4") == 0) || (ascii_strcasecmp (arg, "weechatdir") == 0) )
359          {          {
360              info = weechat_home;              info = weechat_home;
361          }          }
362          else if ( (strcasecmp (arg, "5") == 0) || (strcasecmp (arg, "away") == 0) )          else if ( (ascii_strcasecmp (arg, "5") == 0) || (ascii_strcasecmp (arg, "away") == 0) )
363          {                  {        
364              return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);              return Py_BuildValue ("i", SERVER(gui_current_window->buffer)->is_away);
365          }          }
366          else if ( (strcasecmp (arg, "100") == 0) || (strcasecmp (arg, "dccs") == 0) )          else if ( (ascii_strcasecmp (arg, "100") == 0) || (ascii_strcasecmp (arg, "dccs") == 0) )
367          {          {
368            t_irc_dcc *p = dcc_list;            t_irc_dcc *p = dcc_list;
369            int nbdccs = 0;            int nbdccs = 0;

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

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