Guest User

Untitled

a guest
May 27th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.82 KB | None | 0 0
  1. static int
  2. cmd_allchannels (session *sess, char *tbuf, char *word[], char *word_eol[])
  3. {
  4.     GSList *list = sess_list;
  5.  
  6.     if (!*word_eol[2])
  7.         return FALSE;
  8.  
  9.     while (list)
  10.     {
  11.         sess = list->data;
  12.         if (sess->type == SESS_CHANNEL && sess->channel[0] && sess->server->connected)
  13.         {
  14.             handle_command (sess, word_eol[2], FALSE);
  15.         }
  16.         list = list->next;
  17.     }
  18.  
  19.     return TRUE;
  20. }
  21.  
  22. static int
  23. cmd_allchannelslocal (session *sess, char *tbuf, char *word[], char *word_eol[])
  24. {
  25.     GSList *list = sess_list;
  26.     server *serv = sess->server;
  27.  
  28.     if (!*word_eol[2])
  29.         return FALSE;
  30.  
  31.     while (list)
  32.     {
  33.         sess = list->data;
  34.         if (sess->type == SESS_CHANNEL && sess->channel[0] &&
  35.              sess->server->connected && sess->server == serv)
  36.         {
  37.             handle_command (sess, word_eol[2], FALSE);
  38.         }
  39.         list = list->next;
  40.     }
  41.  
  42.     return TRUE;
  43. }
Add Comment
Please, Sign In to add comment