Changeset 5308:90bb00b0ea22 in roaraudio
- Timestamp:
- 11/28/11 23:58:30 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/roard/protocol-irc.c
r5307 r5308 36 36 static int on_privmsg(int client, const char * cmd, char * args, char * text); 37 37 38 static int on_list(int client, const char * cmd, char * args, char * text); 38 39 static int on_join(int client, const char * cmd, char * args, char * text); 39 40 static int on_part(int client, const char * cmd, char * args, char * text); … … 77 78 {"PRIVMSG", on_privmsg}, 78 79 {"NOTICE", on_privmsg}, 80 {"LIST", on_list}, 79 81 {"JOIN", on_join}, 80 82 {"PART", on_part}, … … 682 684 683 685 686 static int on_list(int client, const char * cmd, char * args, char * text) { 687 const char * clientnick = get_nick(client); 688 struct channel * c; 689 size_t i; 690 691 (void)cmd, (void)args, (void)text; 692 693 put_printf(client, ":%s 321 %s Channel :Users Name\n", server_name, clientnick); 694 695 for (i = 0; i < MAX_CHANNELS; i++) { 696 c = &(g_channels[i]); 697 if ( !c->client_count ) 698 continue; 699 700 put_printf(client, ":%s 322 %s %s %zu :[+] %s\n", 701 server_name, clientnick, c->name, c->client_count, c->topic.text == NULL ? "" : c->topic.text); 702 } 703 704 put_printf(client, ":%s 323 %s :End of /LIST\n", server_name, clientnick); 705 706 return 0; 707 } 708 684 709 static int on_join(int client, const char * cmd, char * args, char * text) { 685 710 struct channel * c;
Note: See TracChangeset
for help on using the changeset viewer.