comparison src/util.c @ 3572:bdd0bebd2d04

[gaim-migrate @ 3670] Phase II. No longer do you have to worry about protocol plugins. When Gaim probes plugins on load, it will detect protocol plugins and add them to the list of available protocols. When you try to log an account on with one of them, Gaim will automatically load the plugin--when no more accounts need the protocol--Gaim will automatically unload it. Protocol plugins are no longer available in the plugins ui, and no protocols are compiled statically by default. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 30 Sep 2002 01:05:18 +0000
parents f38516e5d1ab
children 9682c0e022c6
comparison
equal deleted inserted replaced
3571:a88c62c5b7da 3572:bdd0bebd2d04
1000 1000
1001 if (why & OPT_LOG_MY_SIGNON) { 1001 if (why & OPT_LOG_MY_SIGNON) {
1002 switch (what) { 1002 switch (what) {
1003 case log_signon: 1003 case log_signon:
1004 g_snprintf(text, sizeof(text), "+++ %s (%s) signed on @ %s", 1004 g_snprintf(text, sizeof(text), "+++ %s (%s) signed on @ %s",
1005 gc->username, gc->prpl->name(), full_date()); 1005 gc->username, gc->prpl->name, full_date());
1006 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 1006 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
1007 break; 1007 break;
1008 case log_signoff: 1008 case log_signoff:
1009 g_snprintf(text, sizeof(text), "+++ %s (%s) signed off @ %s", 1009 g_snprintf(text, sizeof(text), "+++ %s (%s) signed off @ %s",
1010 gc->username, gc->prpl->name(), full_date()); 1010 gc->username, gc->prpl->name, full_date());
1011 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1011 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1012 break; 1012 break;
1013 case log_away: 1013 case log_away:
1014 g_snprintf(text, sizeof(text), "+++ %s (%s) changed away state @ %s", 1014 g_snprintf(text, sizeof(text), "+++ %s (%s) changed away state @ %s",
1015 gc->username, gc->prpl->name(), full_date()); 1015 gc->username, gc->prpl->name, full_date());
1016 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 1016 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
1017 break; 1017 break;
1018 case log_back: 1018 case log_back:
1019 g_snprintf(text, sizeof(text), "+++ %s (%s) came back @ %s", 1019 g_snprintf(text, sizeof(text), "+++ %s (%s) came back @ %s",
1020 gc->username, gc->prpl->name(), full_date()); 1020 gc->username, gc->prpl->name, full_date());
1021 g_snprintf(html, sizeof(html), "%s", text); 1021 g_snprintf(html, sizeof(html), "%s", text);
1022 break; 1022 break;
1023 case log_idle: 1023 case log_idle:
1024 g_snprintf(text, sizeof(text), "+++ %s (%s) became idle @ %s", 1024 g_snprintf(text, sizeof(text), "+++ %s (%s) became idle @ %s",
1025 gc->username, gc->prpl->name(), full_date()); 1025 gc->username, gc->prpl->name, full_date());
1026 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 1026 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
1027 break; 1027 break;
1028 case log_unidle: 1028 case log_unidle:
1029 g_snprintf(text, sizeof(text), "+++ %s (%s) returned from idle @ %s", 1029 g_snprintf(text, sizeof(text), "+++ %s (%s) returned from idle @ %s",
1030 gc->username, gc->prpl->name(), full_date()); 1030 gc->username, gc->prpl->name, full_date());
1031 g_snprintf(html, sizeof(html), "%s", text); 1031 g_snprintf(html, sizeof(html), "%s", text);
1032 break; 1032 break;
1033 case log_quit: 1033 case log_quit:
1034 g_snprintf(text, sizeof(text), "+++ Program exit @ %s", full_date()); 1034 g_snprintf(text, sizeof(text), "+++ Program exit @ %s", full_date());
1035 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1035 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1037 } 1037 }
1038 } else if (strcmp(who->name, who->show)) { 1038 } else if (strcmp(who->name, who->show)) {
1039 switch (what) { 1039 switch (what) {
1040 case log_signon: 1040 case log_signon:
1041 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed on @ %s", 1041 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed on @ %s",
1042 gc->username, gc->prpl->name(), who->show, who->name, full_date()); 1042 gc->username, gc->prpl->name, who->show, who->name, full_date());
1043 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 1043 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
1044 break; 1044 break;
1045 case log_signoff: 1045 case log_signoff:
1046 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed off @ %s", 1046 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed off @ %s",
1047 gc->username, gc->prpl->name(), who->show, who->name, full_date()); 1047 gc->username, gc->prpl->name, who->show, who->name, full_date());
1048 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1048 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1049 break; 1049 break;
1050 case log_away: 1050 case log_away:
1051 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) went away @ %s", 1051 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) went away @ %s",
1052 gc->username, gc->prpl->name(), who->show, who->name, full_date()); 1052 gc->username, gc->prpl->name, who->show, who->name, full_date());
1053 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 1053 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
1054 break; 1054 break;
1055 case log_back: 1055 case log_back:
1056 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) came back @ %s", 1056 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) came back @ %s",
1057 gc->username, gc->prpl->name(), who->show, who->name, full_date()); 1057 gc->username, gc->prpl->name, who->show, who->name, full_date());
1058 g_snprintf(html, sizeof(html), "%s", text); 1058 g_snprintf(html, sizeof(html), "%s", text);
1059 break; 1059 break;
1060 case log_idle: 1060 case log_idle:
1061 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) became idle @ %s", 1061 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) became idle @ %s",
1062 gc->username, gc->prpl->name(), who->show, who->name, full_date()); 1062 gc->username, gc->prpl->name, who->show, who->name, full_date());
1063 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 1063 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
1064 break; 1064 break;
1065 case log_unidle: 1065 case log_unidle:
1066 g_snprintf(text, sizeof(text), 1066 g_snprintf(text, sizeof(text),
1067 "%s (%s) reported that %s (%s) returned from idle @ %s", gc->username, 1067 "%s (%s) reported that %s (%s) returned from idle @ %s", gc->username,
1068 gc->prpl->name(), who->show, who->name, full_date()); 1068 gc->prpl->name, who->show, who->name, full_date());
1069 g_snprintf(html, sizeof(html), "%s", text); 1069 g_snprintf(html, sizeof(html), "%s", text);
1070 break; 1070 break;
1071 default: 1071 default:
1072 fclose(fd); 1072 fclose(fd);
1073 return; 1073 return;
1075 } 1075 }
1076 } else { 1076 } else {
1077 switch (what) { 1077 switch (what) {
1078 case log_signon: 1078 case log_signon:
1079 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed on @ %s", 1079 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed on @ %s",
1080 gc->username, gc->prpl->name(), who->name, full_date()); 1080 gc->username, gc->prpl->name, who->name, full_date());
1081 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 1081 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
1082 break; 1082 break;
1083 case log_signoff: 1083 case log_signoff:
1084 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed off @ %s", 1084 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed off @ %s",
1085 gc->username, gc->prpl->name(), who->name, full_date()); 1085 gc->username, gc->prpl->name, who->name, full_date());
1086 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1086 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1087 break; 1087 break;
1088 case log_away: 1088 case log_away:
1089 g_snprintf(text, sizeof(text), "%s (%s) reported that %s went away @ %s", 1089 g_snprintf(text, sizeof(text), "%s (%s) reported that %s went away @ %s",
1090 gc->username, gc->prpl->name(), who->name, full_date()); 1090 gc->username, gc->prpl->name, who->name, full_date());
1091 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 1091 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
1092 break; 1092 break;
1093 case log_back: 1093 case log_back:
1094 g_snprintf(text, sizeof(text), "%s (%s) reported that %s came back @ %s", 1094 g_snprintf(text, sizeof(text), "%s (%s) reported that %s came back @ %s",
1095 gc->username, gc->prpl->name(), who->name, full_date()); 1095 gc->username, gc->prpl->name, who->name, full_date());
1096 g_snprintf(html, sizeof(html), "%s", text); 1096 g_snprintf(html, sizeof(html), "%s", text);
1097 break; 1097 break;
1098 case log_idle: 1098 case log_idle:
1099 g_snprintf(text, sizeof(text), "%s (%s) reported that %s became idle @ %s", 1099 g_snprintf(text, sizeof(text), "%s (%s) reported that %s became idle @ %s",
1100 gc->username, gc->prpl->name(), who->name, full_date()); 1100 gc->username, gc->prpl->name, who->name, full_date());
1101 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 1101 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
1102 break; 1102 break;
1103 case log_unidle: 1103 case log_unidle:
1104 g_snprintf(text, sizeof(text), 1104 g_snprintf(text, sizeof(text),
1105 "%s (%s) reported that %s returned from idle @ %s", gc->username, 1105 "%s (%s) reported that %s returned from idle @ %s", gc->username,
1106 gc->prpl->name(), who->name, full_date()); 1106 gc->prpl->name, who->name, full_date());
1107 g_snprintf(html, sizeof(html), "%s", text); 1107 g_snprintf(html, sizeof(html), "%s", text);
1108 break; 1108 break;
1109 default: 1109 default:
1110 fclose(fd); 1110 fclose(fd);
1111 return; 1111 return;