Mercurial > pidgin.yaz
comparison src/protocols/irc/irc.c @ 5638:0bdfa28c678e
[gaim-migrate @ 6047]
We're slowly killing off multi.h. The proto_user_split and proto_user_opt
have been replaced with GaimAccountOption and GaimAccountUserSplit
structures, which of course have an API. The account dialog is being
rewritten as well, and will soon allow you to add and modify accounts again.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 01 Jun 2003 17:40:20 +0000 |
parents | 83991299705c |
children | 0a0116686d51 |
comparison
equal
deleted
inserted
replaced
5637:69c92ae58876 | 5638:0bdfa28c678e |
---|---|
39 #include <sys/time.h> | 39 #include <sys/time.h> |
40 #include <time.h> | 40 #include <time.h> |
41 #include <sys/stat.h> | 41 #include <sys/stat.h> |
42 #include <ctype.h> | 42 #include <ctype.h> |
43 #include "gaim.h" | 43 #include "gaim.h" |
44 #include "accountopt.h" | |
44 #include "multi.h" | 45 #include "multi.h" |
45 #include "core.h" | 46 #include "core.h" |
46 #include "prpl.h" | 47 #include "prpl.h" |
47 #include "proxy.h" | 48 #include "proxy.h" |
48 | 49 |
50 #include "win32dep.h" | 51 #include "win32dep.h" |
51 #endif | 52 #endif |
52 | 53 |
53 #define IRC_BUF_LEN 4096 | 54 #define IRC_BUF_LEN 4096 |
54 #define PDIWORDS 32 | 55 #define PDIWORDS 32 |
55 | |
56 #define USEROPT_SERV 0 | |
57 #define USEROPT_PORT 1 | |
58 #define USEROPT_CHARSET 2 | |
59 | 56 |
60 #define DEFAULT_SERVER "irc.freenode.net" | 57 #define DEFAULT_SERVER "irc.freenode.net" |
61 | 58 |
62 static GaimPlugin *my_protocol = NULL; | 59 static GaimPlugin *my_protocol = NULL; |
63 | 60 |
3030 }; | 3027 }; |
3031 | 3028 |
3032 static void | 3029 static void |
3033 __init_plugin(GaimPlugin *plugin) | 3030 __init_plugin(GaimPlugin *plugin) |
3034 { | 3031 { |
3035 struct proto_user_opt *puo; | 3032 GaimAccountUserSplit *split; |
3036 struct proto_user_split *pus; | 3033 GaimAccountOption *option; |
3037 | 3034 |
3038 pus = g_new0(struct proto_user_split, 1); | 3035 split = gaim_account_user_split_new(_("Server"), DEFAULT_SERVER, '@'); |
3039 pus->sep = '@'; | 3036 prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); |
3040 pus->label = g_strdup(_("Server:")); | 3037 |
3041 pus->def = g_strdup(DEFAULT_SERVER); | 3038 |
3042 prpl_info.user_splits = g_list_append(prpl_info.user_splits, pus); | 3039 option = gaim_account_option_int_new(_("Port"), "port", 6667); |
3043 | 3040 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
3044 puo = g_new0(struct proto_user_opt, 1); | 3041 option); |
3045 puo->label = g_strdup(_("Port:")); | 3042 |
3046 puo->def = g_strdup("6667"); | 3043 option = gaim_account_option_string_new(_("Encoding"), "charset", |
3047 puo->pos = USEROPT_PORT; | 3044 "ISO-8859-1"); |
3048 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); | 3045 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, |
3049 | 3046 option); |
3050 puo = g_new0(struct proto_user_opt, 1); | |
3051 puo->label = g_strdup(_("Encoding:")); | |
3052 puo->def = g_strdup("ISO-8859-1"); | |
3053 puo->pos = USEROPT_CHARSET; | |
3054 prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); | |
3055 | 3047 |
3056 my_protocol = plugin; | 3048 my_protocol = plugin; |
3057 } | 3049 } |
3058 | 3050 |
3059 GAIM_INIT_PLUGIN(irc, __init_plugin, info); | 3051 GAIM_INIT_PLUGIN(irc, __init_plugin, info); |