comparison src/util.c @ 2662:b0c5770156e1

[gaim-migrate @ 2675] everything changed! not really. actually to be quite honest nothing changed. it's really bad that all of these files use prpl references. most of them shouldn't. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 02 Nov 2001 01:41:37 +0000
parents 3e2f455cb924
children cd23279122ed
comparison
equal deleted inserted replaced
2661:5e9a033f04fa 2662:b0c5770156e1
961 961
962 if (why & OPT_LOG_MY_SIGNON) { 962 if (why & OPT_LOG_MY_SIGNON) {
963 switch (what) { 963 switch (what) {
964 case log_signon: 964 case log_signon:
965 g_snprintf(text, sizeof(text), "+++ %s (%s) signed on @ %s", 965 g_snprintf(text, sizeof(text), "+++ %s (%s) signed on @ %s",
966 gc->username, (*gc->prpl->name)(), full_date()); 966 gc->username, gc->prpl->name(), full_date());
967 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 967 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
968 break; 968 break;
969 case log_signoff: 969 case log_signoff:
970 g_snprintf(text, sizeof(text), "+++ %s (%s) signed off @ %s", 970 g_snprintf(text, sizeof(text), "+++ %s (%s) signed off @ %s",
971 gc->username, (*gc->prpl->name)(), full_date()); 971 gc->username, gc->prpl->name(), full_date());
972 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 972 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
973 break; 973 break;
974 case log_away: 974 case log_away:
975 g_snprintf(text, sizeof(text), "+++ %s (%s) changed away state @ %s", 975 g_snprintf(text, sizeof(text), "+++ %s (%s) changed away state @ %s",
976 gc->username, (*gc->prpl->name)(), full_date()); 976 gc->username, gc->prpl->name(), full_date());
977 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 977 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
978 break; 978 break;
979 case log_back: 979 case log_back:
980 g_snprintf(text, sizeof(text), "+++ %s (%s) came back @ %s", 980 g_snprintf(text, sizeof(text), "+++ %s (%s) came back @ %s",
981 gc->username, (*gc->prpl->name)(), full_date()); 981 gc->username, gc->prpl->name(), full_date());
982 g_snprintf(html, sizeof(html), "%s", text); 982 g_snprintf(html, sizeof(html), "%s", text);
983 break; 983 break;
984 case log_idle: 984 case log_idle:
985 g_snprintf(text, sizeof(text), "+++ %s (%s) became idle @ %s", 985 g_snprintf(text, sizeof(text), "+++ %s (%s) became idle @ %s",
986 gc->username, (*gc->prpl->name)(), full_date()); 986 gc->username, gc->prpl->name(), full_date());
987 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 987 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
988 break; 988 break;
989 case log_unidle: 989 case log_unidle:
990 g_snprintf(text, sizeof(text), "+++ %s (%s) returned from idle @ %s", 990 g_snprintf(text, sizeof(text), "+++ %s (%s) returned from idle @ %s",
991 gc->username, (*gc->prpl->name)(), full_date()); 991 gc->username, gc->prpl->name(), full_date());
992 g_snprintf(html, sizeof(html), "%s", text); 992 g_snprintf(html, sizeof(html), "%s", text);
993 break; 993 break;
994 case log_quit: 994 case log_quit:
995 g_snprintf(text, sizeof(text), "+++ Program exit @ %s", full_date()); 995 g_snprintf(text, sizeof(text), "+++ Program exit @ %s", full_date());
996 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 996 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
998 } 998 }
999 } else if (strcmp(who->name, who->show)) { 999 } else if (strcmp(who->name, who->show)) {
1000 switch (what) { 1000 switch (what) {
1001 case log_signon: 1001 case log_signon:
1002 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed on @ %s", 1002 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed on @ %s",
1003 gc->username, (*gc->prpl->name)(), who->show, who->name, full_date()); 1003 gc->username, gc->prpl->name(), who->show, who->name, full_date());
1004 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 1004 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
1005 break; 1005 break;
1006 case log_signoff: 1006 case log_signoff:
1007 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed off @ %s", 1007 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) signed off @ %s",
1008 gc->username, (*gc->prpl->name)(), who->show, who->name, full_date()); 1008 gc->username, gc->prpl->name(), who->show, who->name, full_date());
1009 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1009 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1010 break; 1010 break;
1011 case log_away: 1011 case log_away:
1012 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) went away @ %s", 1012 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) went away @ %s",
1013 gc->username, (*gc->prpl->name)(), who->show, who->name, full_date()); 1013 gc->username, gc->prpl->name(), who->show, who->name, full_date());
1014 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 1014 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
1015 break; 1015 break;
1016 case log_back: 1016 case log_back:
1017 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) came back @ %s", 1017 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) came back @ %s",
1018 gc->username, (*gc->prpl->name)(), who->show, who->name, full_date()); 1018 gc->username, gc->prpl->name(), who->show, who->name, full_date());
1019 g_snprintf(html, sizeof(html), "%s", text); 1019 g_snprintf(html, sizeof(html), "%s", text);
1020 break; 1020 break;
1021 case log_idle: 1021 case log_idle:
1022 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) became idle @ %s", 1022 g_snprintf(text, sizeof(text), "%s (%s) reported that %s (%s) became idle @ %s",
1023 gc->username, (*gc->prpl->name)(), who->show, who->name, full_date()); 1023 gc->username, gc->prpl->name(), who->show, who->name, full_date());
1024 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 1024 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
1025 break; 1025 break;
1026 case log_unidle: 1026 case log_unidle:
1027 g_snprintf(text, sizeof(text), 1027 g_snprintf(text, sizeof(text),
1028 "%s (%s) reported that %s (%s) returned from idle @ %s", gc->username, 1028 "%s (%s) reported that %s (%s) returned from idle @ %s", gc->username,
1029 (*gc->prpl->name)(), who->show, who->name, full_date()); 1029 gc->prpl->name(), who->show, who->name, full_date());
1030 g_snprintf(html, sizeof(html), "%s", text); 1030 g_snprintf(html, sizeof(html), "%s", text);
1031 break; 1031 break;
1032 default: 1032 default:
1033 fclose(fd); 1033 fclose(fd);
1034 return; 1034 return;
1036 } 1036 }
1037 } else { 1037 } else {
1038 switch (what) { 1038 switch (what) {
1039 case log_signon: 1039 case log_signon:
1040 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed on @ %s", 1040 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed on @ %s",
1041 gc->username, (*gc->prpl->name)(), who->name, full_date()); 1041 gc->username, gc->prpl->name(), who->name, full_date());
1042 g_snprintf(html, sizeof(html), "<B>%s</B>", text); 1042 g_snprintf(html, sizeof(html), "<B>%s</B>", text);
1043 break; 1043 break;
1044 case log_signoff: 1044 case log_signoff:
1045 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed off @ %s", 1045 g_snprintf(text, sizeof(text), "%s (%s) reported that %s signed off @ %s",
1046 gc->username, (*gc->prpl->name)(), who->name, full_date()); 1046 gc->username, gc->prpl->name(), who->name, full_date());
1047 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text); 1047 g_snprintf(html, sizeof(html), "<I><FONT COLOR=GRAY>%s</FONT></I>", text);
1048 break; 1048 break;
1049 case log_away: 1049 case log_away:
1050 g_snprintf(text, sizeof(text), "%s (%s) reported that %s went away @ %s", 1050 g_snprintf(text, sizeof(text), "%s (%s) reported that %s went away @ %s",
1051 gc->username, (*gc->prpl->name)(), who->name, full_date()); 1051 gc->username, gc->prpl->name(), who->name, full_date());
1052 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text); 1052 g_snprintf(html, sizeof(html), "<FONT COLOR=OLIVE>%s</FONT>", text);
1053 break; 1053 break;
1054 case log_back: 1054 case log_back:
1055 g_snprintf(text, sizeof(text), "%s (%s) reported that %s came back @ %s", 1055 g_snprintf(text, sizeof(text), "%s (%s) reported that %s came back @ %s",
1056 gc->username, (*gc->prpl->name)(), who->name, full_date()); 1056 gc->username, gc->prpl->name(), who->name, full_date());
1057 g_snprintf(html, sizeof(html), "%s", text); 1057 g_snprintf(html, sizeof(html), "%s", text);
1058 break; 1058 break;
1059 case log_idle: 1059 case log_idle:
1060 g_snprintf(text, sizeof(text), "%s (%s) reported that %s became idle @ %s", 1060 g_snprintf(text, sizeof(text), "%s (%s) reported that %s became idle @ %s",
1061 gc->username, (*gc->prpl->name)(), who->name, full_date()); 1061 gc->username, gc->prpl->name(), who->name, full_date());
1062 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text); 1062 g_snprintf(html, sizeof(html), "<FONT COLOR=GRAY>%s</FONT>", text);
1063 break; 1063 break;
1064 case log_unidle: 1064 case log_unidle:
1065 g_snprintf(text, sizeof(text), 1065 g_snprintf(text, sizeof(text),
1066 "%s (%s) reported that %s returned from idle @ %s", gc->username, 1066 "%s (%s) reported that %s returned from idle @ %s", gc->username,
1067 (*gc->prpl->name)(), who->name, full_date()); 1067 gc->prpl->name(), who->name, full_date());
1068 g_snprintf(html, sizeof(html), "%s", text); 1068 g_snprintf(html, sizeof(html), "%s", text);
1069 break; 1069 break;
1070 default: 1070 default:
1071 fclose(fd); 1071 fclose(fd);
1072 return; 1072 return;