/[cvs]/eggdrop1.9/src/core_party.c
ViewVC logotype

Annotation of /eggdrop1.9/src/core_party.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download) (as text)
Mon Jun 9 02:21:53 2003 UTC (15 years, 10 months ago) by stdarg
Branch: MAIN
Changes since 1.3: +22 -0 lines
File MIME type: text/x-chdr
* Cleanups and a bit of multi-channel partyline support

1 stdarg 1.1 #include <eggdrop/eggdrop.h>
2    
3 stdarg 1.4 static int party_join(partymember_t *p, const char *nick, user_t *u, const char *cmd, const char *text)
4     {
5     if (!text || !strlen(text)) {
6     partymember_write(p, "Syntax: join <channel>", -1);
7     return(0);
8     }
9     partychan_join_name(text, p);
10     return(0);
11     }
12    
13     static int party_part(partymember_t *p, const char *nick, user_t *u, const char *cmd, const char *text)
14     {
15     partychan_t *chan;
16    
17     if (!text || !strlen(text)) chan = partychan_get_default(p);
18     else chan = partychan_lookup_name(text);
19     partychan_part(chan, p, "parting");
20     return(0);
21     }
22    
23 stdarg 1.3 static int party_quit(partymember_t *p, const char *nick, user_t *u, const char *cmd, const char *text)
24 stdarg 1.1 {
25 stdarg 1.3 if (!text) text = "Quit";
26     partymember_write(p, "goodbye!", -1);
27     partymember_delete(p, text);
28 stdarg 1.1 return(0);
29     }
30    
31     static int party_msg(int pid, const char *nick, user_t *u, const char *cmd, const char *text)
32     {
33     return(0);
34     }
35    
36 stdarg 1.2 static int party_set(int pid, const char *nick, user_t *u, const char *cmd, const char *text)
37     {
38     return(0);
39     }
40    
41     static int party_save(int pid, const char *nick, user_t *u, const char *cmd, const char *text)
42     {
43     core_config_save();
44     return(1);
45     }
46    
47 stdarg 1.1 static bind_list_t core_party_binds[] = {
48 stdarg 1.4 {"join", party_join},
49     {"part", party_part},
50 stdarg 1.1 {"quit", party_quit},
51     {"msg", party_msg},
52 stdarg 1.2 {"set", party_set},
53     {"save", party_save},
54 stdarg 1.1 {0}
55     };
56    
57     void core_party_init()
58     {
59     bind_add_list("party", core_party_binds);
60     }

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23