changeset 84 | 6ff846816073 |
parent 82 | 06d4a9185902 |
child 85 | 93c3cc0d7891 |
83:1cfa0330a32c | 84:6ff846816073 |
---|---|
9 - roster |
9 - roster |
10 - color |
10 - color |
11 - status/status_to |
11 - status/status_to |
12 - add/del |
12 - add/del |
13 - group |
13 - group |
14 - say |
14 - say/msay/say_to |
15 - buffer |
|
16 - clear |
|
17 - info |
|
15 * it does compile, but have not tested at all |
18 * it does compile, but have not tested at all |
16 * privatized say_cmd() |
19 * privatized say_cmd() |
17 * dropped cmd_setstatus() |
20 * dropped cmd_setstatus() |
18 * process_line() still expects line to be in local encoding, |
21 * process_line() still expects line to be in local encoding, |
19 while cmd_execute() expects utf8 and rw |
22 while cmd_execute() expects utf8 and rw |
37 * misc: |
40 * misc: |
38 * fix help for /buffer date |
41 * fix help for /buffer date |
39 |
42 |
40 diff -r 1b0b563a81e6 mcabber/doc/HOWTO_commands.mdwn |
43 diff -r 1b0b563a81e6 mcabber/doc/HOWTO_commands.mdwn |
41 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
44 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
42 +++ b/mcabber/doc/HOWTO_commands.mdwn Sat Mar 23 03:59:57 2013 +0200 |
45 +++ b/mcabber/doc/HOWTO_commands.mdwn Sun Mar 24 00:58:15 2013 +0200 |
43 @@ -0,0 +1,977 @@ |
46 @@ -0,0 +1,977 @@ |
44 + |
47 + |
45 +**New commands interface for MCabber** |
48 +**New commands interface for MCabber** |
46 + |
49 + |
47 +[[!toc levels=2]] |
50 +[[!toc levels=2]] |
1018 +add your argument type to built-in types. |
1021 +add your argument type to built-in types. |
1019 + |
1022 + |
1020 +<!-- vim: se ts=4 sw=4 et filetype=markdown tw=80: --> |
1023 +<!-- vim: se ts=4 sw=4 et filetype=markdown tw=80: --> |
1021 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_buffer.txt |
1024 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_buffer.txt |
1022 --- a/mcabber/doc/help/cs/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1025 --- a/mcabber/doc/help/cs/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1023 +++ b/mcabber/doc/help/cs/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1026 +++ b/mcabber/doc/help/cs/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1024 @@ -25,7 +25,7 @@ |
1027 @@ -25,7 +25,7 @@ |
1025 Přesune se o [n] řádků nahoru (výchozí: polovina obrazovky). |
1028 Přesune se o [n] řádků nahoru (výchozí: polovina obrazovky). |
1026 /buffer down [n] |
1029 /buffer down [n] |
1027 Přesune se o [n] řádků dolů (výchozí: polovina obrazovky). |
1030 Přesune se o [n] řádků dolů (výchozí: polovina obrazovky). |
1028 -/buffer date [datum] |
1031 -/buffer date [datum] |
1030 Přesune se na první řádek po datu [datum] (formát: "RRRR-mm-dd"). |
1033 Přesune se na první řádek po datu [datum] (formát: "RRRR-mm-dd"). |
1031 /buffer % n |
1034 /buffer % n |
1032 Přesune se na procentuální pozici n%. |
1035 Přesune se na procentuální pozici n%. |
1033 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_del.txt |
1036 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_del.txt |
1034 --- a/mcabber/doc/help/cs/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1037 --- a/mcabber/doc/help/cs/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1035 +++ b/mcabber/doc/help/cs/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1038 +++ b/mcabber/doc/help/cs/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1036 @@ -1,4 +1,4 @@ |
1039 @@ -1,4 +1,4 @@ |
1037 |
1040 |
1038 - /DEL |
1041 - /DEL |
1039 + /DEL [-n|--dryrun] [jid] |
1042 + /DEL [-n|--dryrun] [jid] |
1040 |
1043 |
1041 Smaže aktuální kontakt ze seznamu kontaktů (rosteru) a zruší povolení oznamování o stavu daného kontaktu (autorizaci) na obou stranách. |
1044 Smaže aktuální kontakt ze seznamu kontaktů (rosteru) a zruší povolení oznamování o stavu daného kontaktu (autorizaci) na obou stranách. |
1042 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_move.txt |
1045 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_move.txt |
1043 --- a/mcabber/doc/help/cs/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1046 --- a/mcabber/doc/help/cs/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1044 +++ b/mcabber/doc/help/cs/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1047 +++ b/mcabber/doc/help/cs/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1045 @@ -1,5 +1,6 @@ |
1048 @@ -1,5 +1,6 @@ |
1046 |
1049 |
1047 - /MOVE [skupina] |
1050 - /MOVE [skupina] |
1048 + /MOVE [-j|--jid jid] [-n|--name name] [skupina] |
1051 + /MOVE [-j|--jid jid] [-n|--name name] [skupina] |
1049 |
1052 |
1050 Přesune aktuální kontakt do požadované skupiny. Není-li skupina zadána, přesune se kontakt do výchozí skupiny. Pokud skupina neexistuje, automaticky se založí. |
1053 Přesune aktuální kontakt do požadované skupiny. Není-li skupina zadána, přesune se kontakt do výchozí skupiny. Pokud skupina neexistuje, automaticky se založí. |
1051 +You can select other buddy that current using options --jid and --name. |
1054 +You can select other buddy that current using options --jid and --name. |
1052 Tip: V módu rozhovoru lze použít "/roster alternate" pro skok na přesunutý kontakt. |
1055 Tip: V módu rozhovoru lze použít "/roster alternate" pro skok na přesunutý kontakt. |
1053 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_rename.txt |
1056 diff -r 1b0b563a81e6 mcabber/doc/help/cs/hlp_rename.txt |
1054 --- a/mcabber/doc/help/cs/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1057 --- a/mcabber/doc/help/cs/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1055 +++ b/mcabber/doc/help/cs/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1058 +++ b/mcabber/doc/help/cs/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1056 @@ -1,4 +1,6 @@ |
1059 @@ -1,4 +1,6 @@ |
1057 |
1060 |
1058 - /RENAME jméno |
1061 - /RENAME jméno |
1059 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] jméno |
1062 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] jméno |
1060 |
1063 |
1062 +Přejmenuje aktuálního uživatele nebo skupinu na 'jméno'. |
1065 +Přejmenuje aktuálního uživatele nebo skupinu na 'jméno'. |
1063 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1066 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1064 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1067 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1065 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_buffer.txt |
1068 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_buffer.txt |
1066 --- a/mcabber/doc/help/de/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1069 --- a/mcabber/doc/help/de/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1067 +++ b/mcabber/doc/help/de/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1070 +++ b/mcabber/doc/help/de/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1068 @@ -25,7 +25,7 @@ |
1071 @@ -25,7 +25,7 @@ |
1069 Scrollt den Puffer um n Zeilen hoch. Gibt man keine Zahl an, scrollt er um einen halben Bildschirm |
1072 Scrollt den Puffer um n Zeilen hoch. Gibt man keine Zahl an, scrollt er um einen halben Bildschirm |
1070 /buffer down [n] |
1073 /buffer down [n] |
1071 Scrollt den Puffer um n Zeilen runter. Gibt man keine Zahl an, scrollt er um einen halben Bildschirm |
1074 Scrollt den Puffer um n Zeilen runter. Gibt man keine Zahl an, scrollt er um einen halben Bildschirm |
1072 -/buffer date [date] |
1075 -/buffer date [date] |
1074 Springe zu der ersten Zeile nach dem Datum, welches im Format "JJJJ-mm-tt" anstatt [date] angegeben werden muss |
1077 Springe zu der ersten Zeile nach dem Datum, welches im Format "JJJJ-mm-tt" anstatt [date] angegeben werden muss |
1075 /buffer % n |
1078 /buffer % n |
1076 Springe zur Position "n" im Chatpuffer |
1079 Springe zur Position "n" im Chatpuffer |
1077 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_del.txt |
1080 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_del.txt |
1078 --- a/mcabber/doc/help/de/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1081 --- a/mcabber/doc/help/de/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1079 +++ b/mcabber/doc/help/de/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1082 +++ b/mcabber/doc/help/de/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1080 @@ -1,4 +1,4 @@ |
1083 @@ -1,4 +1,4 @@ |
1081 |
1084 |
1082 - /DEL |
1085 - /DEL |
1083 + /DEL [-n|--dryrun] [jid] |
1086 + /DEL [-n|--dryrun] [jid] |
1084 |
1087 |
1085 Löscht den gerade ausgewählten Buddy vom Roster. Außerdem werden die automatischen Presence Benachrichtigungen vom/zum Buddy gestoppt. |
1088 Löscht den gerade ausgewählten Buddy vom Roster. Außerdem werden die automatischen Presence Benachrichtigungen vom/zum Buddy gestoppt. |
1086 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_move.txt |
1089 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_move.txt |
1087 --- a/mcabber/doc/help/de/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1090 --- a/mcabber/doc/help/de/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1088 +++ b/mcabber/doc/help/de/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1091 +++ b/mcabber/doc/help/de/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1089 @@ -1,6 +1,7 @@ |
1092 @@ -1,6 +1,7 @@ |
1090 |
1093 |
1091 - /MOVE [groupname] |
1094 - /MOVE [groupname] |
1092 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1095 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1093 |
1096 |
1095 +You can select other buddy that current using options --jid and --name. |
1098 +You can select other buddy that current using options --jid and --name. |
1096 |
1099 |
1097 Tipp: Wenn der Chatmodus aktiviert ist, kannst du "/roster alternate" benutzen um zu dem gerade bewegten Buddy zu springen. |
1100 Tipp: Wenn der Chatmodus aktiviert ist, kannst du "/roster alternate" benutzen um zu dem gerade bewegten Buddy zu springen. |
1098 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_rename.txt |
1101 diff -r 1b0b563a81e6 mcabber/doc/help/de/hlp_rename.txt |
1099 --- a/mcabber/doc/help/de/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1102 --- a/mcabber/doc/help/de/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1100 +++ b/mcabber/doc/help/de/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1103 +++ b/mcabber/doc/help/de/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1101 @@ -1,4 +1,6 @@ |
1104 @@ -1,4 +1,6 @@ |
1102 |
1105 |
1103 - /RENAME name |
1106 - /RENAME name |
1104 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1107 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1105 |
1108 |
1107 +Setzt den Namen des gerade ausgewählten Buddys bzw. der ausgewählten Gruppe auf "name". |
1110 +Setzt den Namen des gerade ausgewählten Buddys bzw. der ausgewählten Gruppe auf "name". |
1108 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1111 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1109 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1112 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1110 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_buffer.txt |
1113 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_buffer.txt |
1111 --- a/mcabber/doc/help/en/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1114 --- a/mcabber/doc/help/en/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1112 +++ b/mcabber/doc/help/en/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1115 +++ b/mcabber/doc/help/en/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1113 @@ -25,7 +25,7 @@ |
1116 @@ -25,7 +25,7 @@ |
1114 Scroll the buffer up [n] lines (default: half a screen) |
1117 Scroll the buffer up [n] lines (default: half a screen) |
1115 /buffer down [n] |
1118 /buffer down [n] |
1116 Scroll the buffer down [n] lines (default: half a screen) |
1119 Scroll the buffer down [n] lines (default: half a screen) |
1117 -/buffer date [date] |
1120 -/buffer date [date] |
1119 Jump to the first line after the specified [date] in the chat buffer (date format: "YYYY-mm-dd") |
1122 Jump to the first line after the specified [date] in the chat buffer (date format: "YYYY-mm-dd") |
1120 /buffer % n |
1123 /buffer % n |
1121 Jump to position %n of the buddy chat buffer |
1124 Jump to position %n of the buddy chat buffer |
1122 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_del.txt |
1125 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_del.txt |
1123 --- a/mcabber/doc/help/en/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1126 --- a/mcabber/doc/help/en/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1124 +++ b/mcabber/doc/help/en/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1127 +++ b/mcabber/doc/help/en/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1125 @@ -1,4 +1,4 @@ |
1128 @@ -1,4 +1,4 @@ |
1126 |
1129 |
1127 - /DEL |
1130 - /DEL |
1128 + /DEL [-n|--dryrun] [jid] |
1131 + /DEL [-n|--dryrun] [jid] |
1129 |
1132 |
1130 -Delete the current buddy from our roster, unsubscribe from its presence notification and unsubscribe it from ours. |
1133 -Delete the current buddy from our roster, unsubscribe from its presence notification and unsubscribe it from ours. |
1131 +Delete the current buddy or one, specified with [jid] from our roster, unsubscribe from its presence notification and unsubscribe it from ours. |
1134 +Delete the current buddy or one, specified with [jid] from our roster, unsubscribe from its presence notification and unsubscribe it from ours. |
1132 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_move.txt |
1135 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_move.txt |
1133 --- a/mcabber/doc/help/en/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1136 --- a/mcabber/doc/help/en/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1134 +++ b/mcabber/doc/help/en/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1137 +++ b/mcabber/doc/help/en/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1135 @@ -1,5 +1,6 @@ |
1138 @@ -1,5 +1,6 @@ |
1136 |
1139 |
1137 - /MOVE [groupname] |
1140 - /MOVE [groupname] |
1138 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1141 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1139 |
1142 |
1140 Move the current buddy to the requested group. If no group is specified, then the buddy is moved to the default group. If the group "groupname" doesn't exist, it is created. |
1143 Move the current buddy to the requested group. If no group is specified, then the buddy is moved to the default group. If the group "groupname" doesn't exist, it is created. |
1141 +You can select other buddy that current using options --jid and --name. |
1144 +You can select other buddy that current using options --jid and --name. |
1142 Tip: if the chatmode is enabled, you can use "/roster alternate" to jump to the moved buddy. |
1145 Tip: if the chatmode is enabled, you can use "/roster alternate" to jump to the moved buddy. |
1143 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_rename.txt |
1146 diff -r 1b0b563a81e6 mcabber/doc/help/en/hlp_rename.txt |
1144 --- a/mcabber/doc/help/en/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1147 --- a/mcabber/doc/help/en/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1145 +++ b/mcabber/doc/help/en/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1148 +++ b/mcabber/doc/help/en/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1146 @@ -1,4 +1,6 @@ |
1149 @@ -1,4 +1,6 @@ |
1147 |
1150 |
1148 - /RENAME name |
1151 - /RENAME name |
1149 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1152 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1150 |
1153 |
1152 +Rename the current buddy or group to the given "newname". |
1155 +Rename the current buddy or group to the given "newname". |
1153 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1156 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1154 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1157 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1155 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_buffer.txt |
1158 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_buffer.txt |
1156 --- a/mcabber/doc/help/fr/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1159 --- a/mcabber/doc/help/fr/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1157 +++ b/mcabber/doc/help/fr/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1160 +++ b/mcabber/doc/help/fr/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1158 @@ -25,7 +25,7 @@ |
1161 @@ -25,7 +25,7 @@ |
1159 Défile vers le haut de [n] lignes (par défaut un demi écran) |
1162 Défile vers le haut de [n] lignes (par défaut un demi écran) |
1160 /buffer down [n] |
1163 /buffer down [n] |
1161 Défile vers le bas de [n] lignes (par défaut un demi écran) |
1164 Défile vers le bas de [n] lignes (par défaut un demi écran) |
1162 -/buffer date [date] |
1165 -/buffer date [date] |
1164 Va à la première ligne après la [date] dans le tampon actuel (format: "aaaa-mm-jj") |
1167 Va à la première ligne après la [date] dans le tampon actuel (format: "aaaa-mm-jj") |
1165 /buffer % n |
1168 /buffer % n |
1166 Va à la position n% du tampon |
1169 Va à la position n% du tampon |
1167 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_del.txt |
1170 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_del.txt |
1168 --- a/mcabber/doc/help/fr/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1171 --- a/mcabber/doc/help/fr/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1169 +++ b/mcabber/doc/help/fr/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1172 +++ b/mcabber/doc/help/fr/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1170 @@ -1,4 +1,4 @@ |
1173 @@ -1,4 +1,4 @@ |
1171 |
1174 |
1172 - /DEL |
1175 - /DEL |
1173 + /DEL [-n|--dryrun] [jid] |
1176 + /DEL [-n|--dryrun] [jid] |
1174 |
1177 |
1175 Supprime le contact sélectionné du roster, supprime notre abonnement à ses notifications de présence et supprime son abonnement aux nôtres. |
1178 Supprime le contact sélectionné du roster, supprime notre abonnement à ses notifications de présence et supprime son abonnement aux nôtres. |
1176 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_move.txt |
1179 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_move.txt |
1177 --- a/mcabber/doc/help/fr/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1180 --- a/mcabber/doc/help/fr/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1178 +++ b/mcabber/doc/help/fr/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1181 +++ b/mcabber/doc/help/fr/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1179 @@ -1,5 +1,6 @@ |
1182 @@ -1,5 +1,6 @@ |
1180 |
1183 |
1181 - /MOVE [groupname] |
1184 - /MOVE [groupname] |
1182 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1185 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1183 |
1186 |
1184 Déplace le contact sélectionné vers le groupe spécifié. Si aucun groupe n'est donné, le contact est déplacé vers le groupe par défaut. Si le groupe "groupname" n'existe pas, il est créé. |
1187 Déplace le contact sélectionné vers le groupe spécifié. Si aucun groupe n'est donné, le contact est déplacé vers le groupe par défaut. Si le groupe "groupname" n'existe pas, il est créé. |
1185 +You can select other buddy that current using options --jid and --name. |
1188 +You can select other buddy that current using options --jid and --name. |
1186 Astuce : si le mode discussion (chatmode) est activé, vous pouvez utiliser "/roster alternate" pour vous positionner sur le contact que vous venez de déplacer. |
1189 Astuce : si le mode discussion (chatmode) est activé, vous pouvez utiliser "/roster alternate" pour vous positionner sur le contact que vous venez de déplacer. |
1187 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_rename.txt |
1190 diff -r 1b0b563a81e6 mcabber/doc/help/fr/hlp_rename.txt |
1188 --- a/mcabber/doc/help/fr/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1191 --- a/mcabber/doc/help/fr/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1189 +++ b/mcabber/doc/help/fr/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1192 +++ b/mcabber/doc/help/fr/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1190 @@ -1,4 +1,6 @@ |
1193 @@ -1,4 +1,6 @@ |
1191 |
1194 |
1192 - /RENAME nom |
1195 - /RENAME nom |
1193 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nom |
1196 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nom |
1194 |
1197 |
1196 +Renomme le contact/groupe sélectionné avec le "nom" spécifié. |
1199 +Renomme le contact/groupe sélectionné avec le "nom" spécifié. |
1197 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1200 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1198 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1201 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1199 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_buffer.txt |
1202 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_buffer.txt |
1200 --- a/mcabber/doc/help/it/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1203 --- a/mcabber/doc/help/it/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1201 +++ b/mcabber/doc/help/it/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1204 +++ b/mcabber/doc/help/it/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1202 @@ -25,7 +25,7 @@ |
1205 @@ -25,7 +25,7 @@ |
1203 Fa scorrere indietro il buffer di [n] linee (default: metà schermo) |
1206 Fa scorrere indietro il buffer di [n] linee (default: metà schermo) |
1204 /buffer down [n] |
1207 /buffer down [n] |
1205 Fa scorrere avanti il buffer di [n] linee (default: metà schermo) |
1208 Fa scorrere avanti il buffer di [n] linee (default: metà schermo) |
1206 -/buffer date [data] |
1209 -/buffer date [data] |
1208 Salta alla prima linea successiva alla [data] specificata nel buffer di chat (formato della data: "YYYY-mm-dd") |
1211 Salta alla prima linea successiva alla [data] specificata nel buffer di chat (formato della data: "YYYY-mm-dd") |
1209 /buffer % n |
1212 /buffer % n |
1210 Salta alla posizione %n del buffer di chat corrente |
1213 Salta alla posizione %n del buffer di chat corrente |
1211 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_del.txt |
1214 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_del.txt |
1212 --- a/mcabber/doc/help/it/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1215 --- a/mcabber/doc/help/it/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1213 +++ b/mcabber/doc/help/it/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1216 +++ b/mcabber/doc/help/it/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1214 @@ -1,4 +1,4 @@ |
1217 @@ -1,4 +1,4 @@ |
1215 |
1218 |
1216 - /DEL |
1219 - /DEL |
1217 + /DEL [-n|--dryrun] [jid] |
1220 + /DEL [-n|--dryrun] [jid] |
1218 |
1221 |
1219 Elimina il contatto corrente dal roster, cancellando la sottoscrizione alle reciproche notifiche della propria presenza. |
1222 Elimina il contatto corrente dal roster, cancellando la sottoscrizione alle reciproche notifiche della propria presenza. |
1220 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_move.txt |
1223 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_move.txt |
1221 --- a/mcabber/doc/help/it/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1224 --- a/mcabber/doc/help/it/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1222 +++ b/mcabber/doc/help/it/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1225 +++ b/mcabber/doc/help/it/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1223 @@ -1,5 +1,6 @@ |
1226 @@ -1,5 +1,6 @@ |
1224 |
1227 |
1225 - /MOVE [gruppo] |
1228 - /MOVE [gruppo] |
1226 + /MOVE [-j|--jid jid] [-n|--name name] [grouppo] |
1229 + /MOVE [-j|--jid jid] [-n|--name name] [grouppo] |
1227 |
1230 |
1228 Muove il contatto corrente nel gruppo richiesto. Se non viene specificato alcun gruppo, il contatto viene spostato nel gruppo si default. Se il gruppo "gruppo" non esiste, viene creato. |
1231 Muove il contatto corrente nel gruppo richiesto. Se non viene specificato alcun gruppo, il contatto viene spostato nel gruppo si default. Se il gruppo "gruppo" non esiste, viene creato. |
1229 +You can select other buddy that current using options --jid and --name. |
1232 +You can select other buddy that current using options --jid and --name. |
1230 Trucco: se la modalità chat è abilitata, puoi usare "/roster alternate" per spostarti sul contatto appena mosso. |
1233 Trucco: se la modalità chat è abilitata, puoi usare "/roster alternate" per spostarti sul contatto appena mosso. |
1231 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_rename.txt |
1234 diff -r 1b0b563a81e6 mcabber/doc/help/it/hlp_rename.txt |
1232 --- a/mcabber/doc/help/it/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1235 --- a/mcabber/doc/help/it/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1233 +++ b/mcabber/doc/help/it/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1236 +++ b/mcabber/doc/help/it/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1234 @@ -1,4 +1,6 @@ |
1237 @@ -1,4 +1,6 @@ |
1235 |
1238 |
1236 - /RENAME nome |
1239 - /RENAME nome |
1237 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nome |
1240 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nome |
1238 |
1241 |
1240 +Rinomina il contatto od il gruppo correnti usando "nome". |
1243 +Rinomina il contatto od il gruppo correnti usando "nome". |
1241 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1244 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1242 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1245 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1243 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_buffer.txt |
1246 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_buffer.txt |
1244 --- a/mcabber/doc/help/nl/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1247 --- a/mcabber/doc/help/nl/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1245 +++ b/mcabber/doc/help/nl/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1248 +++ b/mcabber/doc/help/nl/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1246 @@ -25,7 +25,7 @@ |
1249 @@ -25,7 +25,7 @@ |
1247 Scroll de buffer [n] regels omhoog (standaard: een half scherm) |
1250 Scroll de buffer [n] regels omhoog (standaard: een half scherm) |
1248 /buffer down [n] |
1251 /buffer down [n] |
1249 Scroll de buffer [n] regels omlaag (standaard: een half scherm) |
1252 Scroll de buffer [n] regels omlaag (standaard: een half scherm) |
1250 -/buffer date [datum] |
1253 -/buffer date [datum] |
1252 Spring naar de eerste regel na de aangeduide [datum] in de chat buffer (datum formaat: "YYYY-mm-dd") |
1255 Spring naar de eerste regel na de aangeduide [datum] in de chat buffer (datum formaat: "YYYY-mm-dd") |
1253 /buffer % n |
1256 /buffer % n |
1254 Spring naar positie %n in de buddy chat buffer |
1257 Spring naar positie %n in de buddy chat buffer |
1255 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_del.txt |
1258 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_del.txt |
1256 --- a/mcabber/doc/help/nl/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1259 --- a/mcabber/doc/help/nl/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1257 +++ b/mcabber/doc/help/nl/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1260 +++ b/mcabber/doc/help/nl/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1258 @@ -1,4 +1,4 @@ |
1261 @@ -1,4 +1,4 @@ |
1259 |
1262 |
1260 - /DEL |
1263 - /DEL |
1261 + /DEL [-n|--dryrun] [jid] |
1264 + /DEL [-n|--dryrun] [jid] |
1262 |
1265 |
1263 Verwijder de actieve buddy uit ons roster, en zet het wederzijds toezenden van status veranderingen stop. |
1266 Verwijder de actieve buddy uit ons roster, en zet het wederzijds toezenden van status veranderingen stop. |
1264 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_move.txt |
1267 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_move.txt |
1265 --- a/mcabber/doc/help/nl/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1268 --- a/mcabber/doc/help/nl/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1266 +++ b/mcabber/doc/help/nl/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1269 +++ b/mcabber/doc/help/nl/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1267 @@ -1,5 +1,6 @@ |
1270 @@ -1,5 +1,6 @@ |
1268 |
1271 |
1269 - /MOVE [groepsnaam] |
1272 - /MOVE [groepsnaam] |
1270 + /MOVE [-j|--jid jid] [-n|--name name] [groepsnaam] |
1273 + /MOVE [-j|--jid jid] [-n|--name name] [groepsnaam] |
1271 |
1274 |
1272 Verplaats de actieve buddy naar de aangegeven groep. Indien geen groep werd gespecificeerd wordt buddy verplaatst naar de standaard groep. Indien de groep "groepsnaam" niet bestaat, wordt die eerst aangemaakt. |
1275 Verplaats de actieve buddy naar de aangegeven groep. Indien geen groep werd gespecificeerd wordt buddy verplaatst naar de standaard groep. Indien de groep "groepsnaam" niet bestaat, wordt die eerst aangemaakt. |
1273 +You can select other buddy that current using options --jid and --name. |
1276 +You can select other buddy that current using options --jid and --name. |
1274 Tip: indien chatmode actief is, kun je "/roster alternate" gebruiken om direct naar de verplaatste buddy te springen. |
1277 Tip: indien chatmode actief is, kun je "/roster alternate" gebruiken om direct naar de verplaatste buddy te springen. |
1275 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_rename.txt |
1278 diff -r 1b0b563a81e6 mcabber/doc/help/nl/hlp_rename.txt |
1276 --- a/mcabber/doc/help/nl/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1279 --- a/mcabber/doc/help/nl/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1277 +++ b/mcabber/doc/help/nl/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1280 +++ b/mcabber/doc/help/nl/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1278 @@ -1,4 +1,6 @@ |
1281 @@ -1,4 +1,6 @@ |
1279 |
1282 |
1280 - /RENAME naam |
1283 - /RENAME naam |
1281 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] naam |
1284 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] naam |
1282 |
1285 |
1284 +Hernoem de actieve buddy of groep in de aangegeven "naam". |
1287 +Hernoem de actieve buddy of groep in de aangegeven "naam". |
1285 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1288 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1286 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1289 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1287 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_del.txt |
1290 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_del.txt |
1288 --- a/mcabber/doc/help/pl/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1291 --- a/mcabber/doc/help/pl/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1289 +++ b/mcabber/doc/help/pl/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1292 +++ b/mcabber/doc/help/pl/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1290 @@ -1,4 +1,4 @@ |
1293 @@ -1,4 +1,4 @@ |
1291 |
1294 |
1292 - /DEL |
1295 - /DEL |
1293 + /DEL [-n|--dryrun] [jid] |
1296 + /DEL [-n|--dryrun] [jid] |
1294 |
1297 |
1295 Usuwa aktualnie zaznaczoną osobę z rostera, usuwa subskrypcję powiadomienia dostępności u danej osoby oraz u nas. |
1298 Usuwa aktualnie zaznaczoną osobę z rostera, usuwa subskrypcję powiadomienia dostępności u danej osoby oraz u nas. |
1296 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_move.txt |
1299 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_move.txt |
1297 --- a/mcabber/doc/help/pl/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1300 --- a/mcabber/doc/help/pl/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1298 +++ b/mcabber/doc/help/pl/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1301 +++ b/mcabber/doc/help/pl/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1299 @@ -1,5 +1,6 @@ |
1302 @@ -1,5 +1,6 @@ |
1300 |
1303 |
1301 - /MOVE [nazwa grupy] |
1304 - /MOVE [nazwa grupy] |
1302 + /MOVE [-j|--jid jid] [-n|--name name] [nazwa grupy] |
1305 + /MOVE [-j|--jid jid] [-n|--name name] [nazwa grupy] |
1303 |
1306 |
1304 Przenosi aktualną osobę do grupy "nazwa grupy". Jeśli nie podano nazwy grupy, wtedy osoba jest przenoszona do grupy domyślnej. Jeśli grupa "nazwa grupy" nie istnieje, zostaje utworzona. |
1307 Przenosi aktualną osobę do grupy "nazwa grupy". Jeśli nie podano nazwy grupy, wtedy osoba jest przenoszona do grupy domyślnej. Jeśli grupa "nazwa grupy" nie istnieje, zostaje utworzona. |
1305 +You can select other buddy that current using options --jid and --name. |
1308 +You can select other buddy that current using options --jid and --name. |
1306 Podpowiedź: jeśli jest włączony tryb czatu, możesz użyć "/roster alternate" aby skoczyć do przeniesionej osoby. |
1309 Podpowiedź: jeśli jest włączony tryb czatu, możesz użyć "/roster alternate" aby skoczyć do przeniesionej osoby. |
1307 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_rename.txt |
1310 diff -r 1b0b563a81e6 mcabber/doc/help/pl/hlp_rename.txt |
1308 --- a/mcabber/doc/help/pl/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1311 --- a/mcabber/doc/help/pl/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1309 +++ b/mcabber/doc/help/pl/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1312 +++ b/mcabber/doc/help/pl/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1310 @@ -1,4 +1,6 @@ |
1313 @@ -1,4 +1,6 @@ |
1311 |
1314 |
1312 - /RENAME nazwa |
1315 - /RENAME nazwa |
1313 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nazwa |
1316 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] nazwa |
1314 |
1317 |
1316 +Zmienia nazwę aktualnej osoby lub grupy na "nazwa". |
1319 +Zmienia nazwę aktualnej osoby lub grupy na "nazwa". |
1317 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1320 +If --reset is specified, "newname" is ignored and name will be reset to default - jid or username. |
1318 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1321 +Optionally you can use one of --jid, --group or --name to select object, different from current. |
1319 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_buffer.txt |
1322 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_buffer.txt |
1320 --- a/mcabber/doc/help/ru/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1323 --- a/mcabber/doc/help/ru/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1321 +++ b/mcabber/doc/help/ru/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1324 +++ b/mcabber/doc/help/ru/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1322 @@ -25,7 +25,7 @@ |
1325 @@ -25,7 +25,7 @@ |
1323 Перемещает на [n] строк вверх в буфере (истории переписки) (по умолчанию: половина экрана) |
1326 Перемещает на [n] строк вверх в буфере (истории переписки) (по умолчанию: половина экрана) |
1324 /buffer down [n] |
1327 /buffer down [n] |
1325 Перемещает на [n] строк вниз в буфере (истории переписки) (по умолчанию: половина экрана) |
1328 Перемещает на [n] строк вниз в буфере (истории переписки) (по умолчанию: половина экрана) |
1326 -/buffer date [date] |
1329 -/buffer date [date] |
1328 Перемещает в первой строке после определенной даты [date] в буфере (истории переписки) (формат даты: "год-месяц-день", для примера "2006-01-01") |
1331 Перемещает в первой строке после определенной даты [date] в буфере (истории переписки) (формат даты: "год-месяц-день", для примера "2006-01-01") |
1329 /buffer % n |
1332 /buffer % n |
1330 Перемещает на позицию %n в текущем буфере (истории переписки) |
1333 Перемещает на позицию %n в текущем буфере (истории переписки) |
1331 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_del.txt |
1334 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_del.txt |
1332 --- a/mcabber/doc/help/ru/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1335 --- a/mcabber/doc/help/ru/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1333 +++ b/mcabber/doc/help/ru/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1336 +++ b/mcabber/doc/help/ru/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1334 @@ -1,4 +1,4 @@ |
1337 @@ -1,4 +1,4 @@ |
1335 |
1338 |
1336 - /DEL |
1339 - /DEL |
1337 + /DEL [-n|--dryrun] [jid] |
1340 + /DEL [-n|--dryrun] [jid] |
1338 |
1341 |
1339 -Удаляет текущего пользователя из списка контактов, отключает уведомления о его статусе и отключает уведомления пользователя о вашем статусе. |
1342 -Удаляет текущего пользователя из списка контактов, отключает уведомления о его статусе и отключает уведомления пользователя о вашем статусе. |
1340 +Удаляет текущего пользователя (или указанного с помощью jid) из списка контактов, отключает уведомления о его статусе и отключает уведомление пользователя о вашем статусе. |
1343 +Удаляет текущего пользователя (или указанного с помощью jid) из списка контактов, отключает уведомления о его статусе и отключает уведомление пользователя о вашем статусе. |
1341 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_move.txt |
1344 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_move.txt |
1342 --- a/mcabber/doc/help/ru/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1345 --- a/mcabber/doc/help/ru/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1343 +++ b/mcabber/doc/help/ru/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1346 +++ b/mcabber/doc/help/ru/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1344 @@ -1,6 +1,7 @@ |
1347 @@ -1,6 +1,7 @@ |
1345 |
1348 |
1346 - /MOVE [groupname] |
1349 - /MOVE [groupname] |
1347 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1350 + /MOVE [-j|--jid jid] [-n|--name name] [groupname] |
1348 |
1351 |
1350 +С помощью параметров --jid и --name можно перемещать контакты, отличные от текущего. |
1353 +С помощью параметров --jid и --name можно перемещать контакты, отличные от текущего. |
1351 Полезно: Если включен режим чата (chatmode), Вы можете использовать "/roster alternate" для перехода к перемещенному пользователю. |
1354 Полезно: Если включен режим чата (chatmode), Вы можете использовать "/roster alternate" для перехода к перемещенному пользователю. |
1352 |
1355 |
1353 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_rename.txt |
1356 diff -r 1b0b563a81e6 mcabber/doc/help/ru/hlp_rename.txt |
1354 --- a/mcabber/doc/help/ru/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1357 --- a/mcabber/doc/help/ru/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1355 +++ b/mcabber/doc/help/ru/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1358 +++ b/mcabber/doc/help/ru/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1356 @@ -1,4 +1,6 @@ |
1359 @@ -1,4 +1,6 @@ |
1357 |
1360 |
1358 - /RENAME name |
1361 - /RENAME name |
1359 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1362 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group name] [-n|--name name] newname |
1360 |
1363 |
1362 +Переименовывает текущего пользователя или группу в заданное имя "newname". |
1365 +Переименовывает текущего пользователя или группу в заданное имя "newname". |
1363 +Если указан параметр --reset, "newname" игнорируется, а имя сбрасывается (mcabber будет отображать JID или имя пользователя по умолчанию). |
1366 +Если указан параметр --reset, "newname" игнорируется, а имя сбрасывается (mcabber будет отображать JID или имя пользователя по умолчанию). |
1364 +Для указания обьекта, отличного от текущего, можно использовать опции --jid, --group и --name. |
1367 +Для указания обьекта, отличного от текущего, можно использовать опции --jid, --group и --name. |
1365 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_buffer.txt |
1368 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_buffer.txt |
1366 --- a/mcabber/doc/help/uk/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1369 --- a/mcabber/doc/help/uk/hlp_buffer.txt Wed Mar 13 16:11:16 2013 +0200 |
1367 +++ b/mcabber/doc/help/uk/hlp_buffer.txt Sat Mar 23 03:59:57 2013 +0200 |
1370 +++ b/mcabber/doc/help/uk/hlp_buffer.txt Sun Mar 24 00:58:15 2013 +0200 |
1368 @@ -25,7 +25,7 @@ |
1371 @@ -25,7 +25,7 @@ |
1369 Посунути буфер вверх на n рядків (якщо не вказано - пів екрану). |
1372 Посунути буфер вверх на n рядків (якщо не вказано - пів екрану). |
1370 /buffer down [n] |
1373 /buffer down [n] |
1371 Посунути буфер вниз на n рядків (якщо не вказано - пів екрану). |
1374 Посунути буфер вниз на n рядків (якщо не вказано - пів екрану). |
1372 -/buffer date [дата] |
1375 -/buffer date [дата] |
1374 Перейти до першого повідомлення після дати (дата вигляду РРРР-ММ-ДД). |
1377 Перейти до першого повідомлення після дати (дата вигляду РРРР-ММ-ДД). |
1375 /buffer % процент |
1378 /buffer % процент |
1376 Перейти до вказаної у процентах позиції. |
1379 Перейти до вказаної у процентах позиції. |
1377 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_del.txt |
1380 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_del.txt |
1378 --- a/mcabber/doc/help/uk/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1381 --- a/mcabber/doc/help/uk/hlp_del.txt Wed Mar 13 16:11:16 2013 +0200 |
1379 +++ b/mcabber/doc/help/uk/hlp_del.txt Sat Mar 23 03:59:57 2013 +0200 |
1382 +++ b/mcabber/doc/help/uk/hlp_del.txt Sun Mar 24 00:58:15 2013 +0200 |
1380 @@ -1,4 +1,4 @@ |
1383 @@ -1,4 +1,4 @@ |
1381 |
1384 |
1382 - /DEL |
1385 - /DEL |
1383 + /DEL [-n|--dryrun] [jid] |
1386 + /DEL [-n|--dryrun] [jid] |
1384 |
1387 |
1385 -Потерти поточний контакт зі списку. На додачу відписатися від його повідомлень про статус і відписати його від ваших. |
1388 -Потерти поточний контакт зі списку. На додачу відписатися від його повідомлень про статус і відписати його від ваших. |
1386 +Потерти поточний контакт (або контакт, що має вказаний jid) зі списку. Також відписатися від його сповіщень про статус і відписати його від ваших. |
1389 +Потерти поточний контакт (або контакт, що має вказаний jid) зі списку. Також відписатися від його сповіщень про статус і відписати його від ваших. |
1387 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_move.txt |
1390 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_move.txt |
1388 --- a/mcabber/doc/help/uk/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1391 --- a/mcabber/doc/help/uk/hlp_move.txt Wed Mar 13 16:11:16 2013 +0200 |
1389 +++ b/mcabber/doc/help/uk/hlp_move.txt Sat Mar 23 03:59:57 2013 +0200 |
1392 +++ b/mcabber/doc/help/uk/hlp_move.txt Sun Mar 24 00:58:15 2013 +0200 |
1390 @@ -1,5 +1,6 @@ |
1393 @@ -1,5 +1,6 @@ |
1391 |
1394 |
1392 - /MOVE [група] |
1395 - /MOVE [група] |
1393 + /MOVE [-j|--jid jid] [-n|--name ім’я] [група] |
1396 + /MOVE [-j|--jid jid] [-n|--name ім’я] [група] |
1394 |
1397 |
1396 +Переносить поточний контакт до вказаної групи. Якщо групу не вказати контакт опиниться у головній групі. Якщо групи не існує, її буде створено. |
1399 +Переносить поточний контакт до вказаної групи. Якщо групу не вказати контакт опиниться у головній групі. Якщо групи не існує, її буде створено. |
1397 +За допомогою опцій --jid та --name можна перемістити контакт, відмінний від поточного. |
1400 +За допомогою опцій --jid та --name можна перемістити контакт, відмінний від поточного. |
1398 Примітка: в режимі розмови можна використати "/roster alternate", щоб перейти до нового місця контакту контакту. |
1401 Примітка: в режимі розмови можна використати "/roster alternate", щоб перейти до нового місця контакту контакту. |
1399 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_rename.txt |
1402 diff -r 1b0b563a81e6 mcabber/doc/help/uk/hlp_rename.txt |
1400 --- a/mcabber/doc/help/uk/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1403 --- a/mcabber/doc/help/uk/hlp_rename.txt Wed Mar 13 16:11:16 2013 +0200 |
1401 +++ b/mcabber/doc/help/uk/hlp_rename.txt Sat Mar 23 03:59:57 2013 +0200 |
1404 +++ b/mcabber/doc/help/uk/hlp_rename.txt Sun Mar 24 00:58:15 2013 +0200 |
1402 @@ -1,4 +1,6 @@ |
1405 @@ -1,4 +1,6 @@ |
1403 |
1406 |
1404 - /RENAME ім'я |
1407 - /RENAME ім'я |
1405 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group ім’я] [-n|--name ім’я] нове ім’я |
1408 + /RENAME [-r|--reset] [-j|--jid jid] [-g|--group ім’я] [-n|--name ім’я] нове ім’я |
1406 |
1409 |
1407 Змінює прізвисько поточного контакту або назву групи. |
1410 Змінює прізвисько поточного контакту або назву групи. |
1408 +За допомогою параметра --reset можна повернути контакту типову назву. При цьому нове ім’я (якщо вказане) ігнорується. |
1411 +За допомогою параметра --reset можна повернути контакту типову назву. При цьому нове ім’я (якщо вказане) ігнорується. |
1409 +Опції --jid, --group та --name дозволяють перейменовувати об’єкти, відмінні від поточного. |
1412 +Опції --jid, --group та --name дозволяють перейменовувати об’єкти, відмінні від поточного. |
1410 diff -r 1b0b563a81e6 mcabber/mcabber/commands.c |
1413 diff -r 1b0b563a81e6 mcabber/mcabber/commands.c |
1411 --- a/mcabber/mcabber/commands.c Wed Mar 13 16:11:16 2013 +0200 |
1414 --- a/mcabber/mcabber/commands.c Wed Mar 13 16:11:16 2013 +0200 |
1412 +++ b/mcabber/mcabber/commands.c Sat Mar 23 03:59:57 2013 +0200 |
1415 +++ b/mcabber/mcabber/commands.c Sun Mar 24 00:58:15 2013 +0200 |
1413 @@ -19,7 +19,7 @@ |
1416 @@ -19,7 +19,7 @@ |
1414 * USA |
1417 * USA |
1415 */ |
1418 */ |
1416 |
1419 |
1417 -#include <string.h> |
1420 -#include <string.h> |
1461 + def_add, |
1464 + def_add, |
1462 + def_del, |
1465 + def_del, |
1463 + def_group, |
1466 + def_group, |
1464 + def_say, |
1467 + def_say, |
1465 + def_msay, |
1468 + def_msay, |
1466 + def_say_to; |
1469 + def_say_to, |
1467 +#if 0 |
|
1468 + def_buffer, |
1470 + def_buffer, |
1469 + def_clear, |
1471 + def_clear, |
1470 + def_info, |
1472 + def_info; |
1473 +#if 0 |
|
1471 + def_rename, |
1474 + def_rename, |
1472 + def_move, |
1475 + def_move, |
1473 + def_set, |
1476 + def_set, |
1474 + def_alias, |
1477 + def_alias, |
1475 + def_bind, |
1478 + def_bind, |
1578 + cmd_list[5] = &def_del; |
1581 + cmd_list[5] = &def_del; |
1579 + cmd_list[6] = &def_group; |
1582 + cmd_list[6] = &def_group; |
1580 + cmd_list[7] = &def_say; |
1583 + cmd_list[7] = &def_say; |
1581 + cmd_list[8] = &def_msay; |
1584 + cmd_list[8] = &def_msay; |
1582 + cmd_list[9] = &def_say_to; |
1585 + cmd_list[9] = &def_say_to; |
1583 +#if 0 |
|
1584 + cmd_list[10] = &def_buffer; |
1586 + cmd_list[10] = &def_buffer; |
1585 + cmd_list[11] = &def_clear; |
1587 + cmd_list[11] = &def_clear; |
1586 + cmd_list[12] = &def_info; |
1588 + cmd_list[12] = &def_info; |
1589 +#if 0 |
|
1587 + cmd_list[13] = &def_rename; |
1590 + cmd_list[13] = &def_rename; |
1588 + cmd_list[14] = &def_move; |
1591 + cmd_list[14] = &def_move; |
1589 + cmd_list[15] = &def_set; |
1592 + cmd_list[15] = &def_set; |
1590 + cmd_list[16] = &def_alias; |
1593 + cmd_list[16] = &def_alias; |
1591 + cmd_list[17] = &def_bind; |
1594 + cmd_list[17] = &def_bind; |
2591 + int retval; |
2594 + int retval; |
2592 + |
2595 + |
2593 if (!*line) { // User only pressed enter |
2596 if (!*line) { // User only pressed enter |
2594 if (scr_get_multimode()) { |
2597 if (scr_get_multimode()) { |
2595 scr_append_multiline(""); |
2598 scr_append_multiline(""); |
2596 @@ -556,141 +725,585 @@ |
2599 @@ -556,141 +725,671 @@ |
2597 } |
2600 } |
2598 if (current_buddy) { |
2601 if (current_buddy) { |
2599 if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_GROUP) |
2602 if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_GROUP) |
2600 - do_group("toggle"); |
2603 - do_group("toggle"); |
2601 + group_cmd (BUDDATA(current_buddy), scmd_group_toggle); |
2604 + group_cmd (BUDDATA(current_buddy), scmd_group_toggle); |
2709 +// + cmdarg_type_nonspace - strip, space only -> null |
2712 +// + cmdarg_type_nonspace - strip, space only -> null |
2710 +// * cmdarg_type_bjidmask |
2713 +// * cmdarg_type_bjidmask |
2711 +// + cmdarg_type_color |
2714 +// + cmdarg_type_color |
2712 +// + cmdarg_type_string2enum |
2715 +// + cmdarg_type_string2enum |
2713 +// * cmdarg_type_nick - provide completions first from current room, then from all other, nonspace, do not restrict |
2716 +// * cmdarg_type_nick - provide completions first from current room, then from all other, nonspace, do not restrict |
2714 + |
2717 +// + cmdarg_type_filename - expand, convert encoding |
2715 +// |
2718 +// + cmdarg_type_date - YYYYMMDDTHHMMSS -> time_t |
2716 +// generic destructors |
|
2717 +// |
|
2718 + |
|
2719 +void cmdarg_free_gfree (cmdarg_value_t *arg) |
|
2720 +{ |
|
2721 + g_free (arg -> value.arg); |
|
2722 +} |
|
2723 + |
2719 + |
2724 +// |
2720 +// |
2725 +// command environment checkers |
2721 +// command environment checkers |
2726 +// |
2722 +// |
2727 + |
2723 + |
2728 +gchar *cmd_check_online (const cmdopts_t *command, cmdarg_value_t *values) |
2724 +gchar *cmd_check_online (const cmdopts_t *command, cmdarg_value_t *values) |
2729 +{ |
2725 +{ |
2730 + if (!xmpp_is_online()) |
2726 + if (!xmpp_is_online()) |
2731 + return g_strdup ("You are not connected!"); |
2727 + return g_strdup ("You are not connected!"); |
2732 + return NULL; |
2728 + return NULL; |
2729 +} |
|
2730 + |
|
2731 +gchar *cmd_check_current_buddy (const cmdopts_t *command, cmdarg_value_t *values) |
|
2732 +{ |
|
2733 + if (!current_buddy) |
|
2734 + return g_strdup ("No selected buddy!"); |
|
2735 + return NULL; |
|
2736 +} |
|
2737 + |
|
2738 +// |
|
2739 +// generic value destructors |
|
2740 +// |
|
2741 + |
|
2742 +void cmdarg_free_gfree (cmdarg_value_t *arg) |
|
2743 +{ |
|
2744 + g_free (arg -> value.arg); |
|
2733 +} |
2745 +} |
2734 + |
2746 + |
2735 +// |
2747 +// |
2736 +// string -> stripspace string |
2748 +// string -> stripspace string |
2737 +// |
2749 +// |
3248 + NULL, |
3260 + NULL, |
3249 + NULL, |
3261 + NULL, |
3250 +}; |
3262 +}; |
3251 + |
3263 + |
3252 +// |
3264 +// |
3265 +// filename -> expanded local + utf8 filename |
|
3266 +// |
|
3267 + |
|
3268 +// Recognizes "~/" as $HOME. |
|
3269 +// Returns utf8 and converted to filesystem encoding file name in value.fname. |
|
3270 +// Requires freeing. |
|
3271 +// XXX: |
|
3272 +// Should we convert filename at all? |
|
3273 +// - it needs extra "big" type in values |
|
3274 +// - it is not convenient to pass to function |
|
3275 +// - utf8 version needs to be always freed |
|
3276 +// - saves a bit of generic code, though. |
|
3277 +gchar *cmdarg_check_filename (cmdarg_value_t *value) |
|
3278 +{ |
|
3279 + gchar *error; |
|
3280 + GError *err = NULL; |
|
3281 + |
|
3282 + if ((error = cmdarg_check_nonspace(value))) |
|
3283 + return error; |
|
3284 + |
|
3285 + value -> value.fname.utf8 = expand_filename (value -> value.arg); |
|
3286 + value -> value.fname.local = g_filename_from_utf8 (value -> value.fname.utf8, |
|
3287 + -1, NULL, NULL, &err); |
|
3288 + if (err) { |
|
3289 + value -> value.fname.utf8 = NULL; |
|
3290 + error = g_strdup_printf ("Filename charset conversion error: %s", |
|
3291 + err -> message); |
|
3292 + g_error_free (err); |
|
3293 + } else { |
|
3294 + value -> flags |= cmdval_freeme; |
|
3295 + } |
|
3296 + |
|
3297 + return error; |
|
3298 +} |
|
3299 + |
|
3300 +void cmdarg_free_fname (cmdarg_value_t *value) |
|
3301 +{ |
|
3302 + g_free (value -> value.fname.utf8); |
|
3303 + g_free (value -> value.fname.local); |
|
3304 +} |
|
3305 + |
|
3306 +const cmdarg_type_t cmdarg_type_filename = { |
|
3307 + cmdarg_check_color, |
|
3308 + cmdarg_free_fname, |
|
3309 + // TODO |
|
3310 + NULL, |
|
3311 +}; |
|
3312 + |
|
3313 +// |
|
3314 +// ISO-8601 date -> epoch |
|
3315 +// |
|
3316 + |
|
3317 +// Converts "YYYYMMDD[(.|T)HH[:]MM[:]SS[.SSS][(+|-)HH:MM]" to epoch. |
|
3318 +// Returns epoch in value.time. |
|
3319 +// Needs no freeing. |
|
3320 +gchar *cmdarg_check_date (cmdarg_value_t *value) |
|
3321 +{ |
|
3322 + gchar *error; |
|
3323 + time_t epoch = 0; |
|
3324 + |
|
3325 + if (!(error = cmdarg_check_nonspace (value))) { |
|
3326 + epoch = from_iso8601 (value -> value.arg, 0); |
|
3327 + if (!epoch) |
|
3328 + error = g_strdup_printf ("Invalid date \"%s\".", value -> value.arg); |
|
3329 + } |
|
3330 + |
|
3331 + value -> value.time = epoch; |
|
3332 + return error; |
|
3333 +} |
|
3334 + |
|
3335 +const cmdarg_type_t cmdarg_type_date = { |
|
3336 + cmdarg_check_date, |
|
3337 + NULL, |
|
3338 + NULL, |
|
3339 +}; |
|
3340 + |
|
3341 +// |
|
3253 +// Command definitions |
3342 +// Command definitions |
3254 +// |
3343 +// |
3255 +// This section contains definitions for built-in mcabber commands. |
3344 +// This section contains definitions for built-in mcabber commands. |
3256 +// If you add a definition here, that should be automatically loaded, |
3345 +// If you add a definition here, that should be automatically loaded, |
3257 +// you also have to add it to cmd_init(). |
3346 +// you also have to add it to cmd_init(). |
3281 -// display the note jid too) |
3370 -// display the note jid too) |
3282 +// display the note jid too). |
3371 +// display the note jid too). |
3283 static void display_and_free_note(struct annotation *note, const char *winId) |
3372 static void display_and_free_note(struct annotation *note, const char *winId) |
3284 { |
3373 { |
3285 gchar tbuf[128]; |
3374 gchar tbuf[128]; |
3286 @@ -755,41 +1368,15 @@ |
3375 @@ -755,41 +1454,15 @@ |
3287 g_slist_free(notes); |
3376 g_slist_free(notes); |
3288 } |
3377 } |
3289 |
3378 |
3290 -static void roster_note(char *arg) |
3379 -static void roster_note(char *arg) |
3291 +static void roster_note(gpointer bud, gboolean reset, gchar *note) |
3380 +static void roster_note(gpointer bud, gboolean reset, gchar *note) |
3331 + xmpp_set_storage_rosternotes(bjid, NULL); |
3420 + xmpp_set_storage_rosternotes(bjid, NULL); |
3332 + else { // display a note |
3421 + else { // display a note |
3333 struct annotation *note = xmpp_get_storage_rosternotes(bjid, FALSE); |
3422 struct annotation *note = xmpp_get_storage_rosternotes(bjid, FALSE); |
3334 if (note) { |
3423 if (note) { |
3335 display_and_free_note(note, bjid); |
3424 display_and_free_note(note, bjid); |
3336 @@ -800,484 +1387,662 @@ |
3425 @@ -800,484 +1473,662 @@ |
3337 } |
3426 } |
3338 } |
3427 } |
3339 |
3428 |
3340 -// roster_updown(updown, nitems) |
3429 -// roster_updown(updown, nitems) |
3341 -// updown: -1=up, +1=down |
3430 -// updown: -1=up, +1=down |
4414 - LmMessageSubType type_overwrite, bool quiet) |
4503 - LmMessageSubType type_overwrite, bool quiet) |
4415 + msgtype_t msg_type, bool quiet) |
4504 + msgtype_t msg_type, bool quiet) |
4416 { |
4505 { |
4417 char *bare_jid, *rp; |
4506 char *bare_jid, *rp; |
4418 char *hmsg; |
4507 char *hmsg; |
4419 @@ -1285,6 +2050,7 @@ |
4508 @@ -1285,6 +2136,7 @@ |
4420 gint retval = 0; |
4509 gint retval = 0; |
4421 int isroom; |
4510 int isroom; |
4422 gpointer xep184 = NULL; |
4511 gpointer xep184 = NULL; |
4423 + LmMessageSubType type_overwrite = LM_MESSAGE_SUB_TYPE_NOT_SET; |
4512 + LmMessageSubType type_overwrite = LM_MESSAGE_SUB_TYPE_NOT_SET; |
4424 |
4513 |
4425 if (!xmpp_is_online()) { |
4514 if (!xmpp_is_online()) { |
4426 scr_LogPrint(LPRINT_NORMAL, "You are not connected."); |
4515 scr_LogPrint(LPRINT_NORMAL, "You are not connected."); |
4427 @@ -1299,11 +2065,15 @@ |
4516 @@ -1299,11 +2151,15 @@ |
4428 return 1; |
4517 return 1; |
4429 } |
4518 } |
4430 if (check_jid_syntax((char*)fjid)) { |
4519 if (check_jid_syntax((char*)fjid)) { |
4431 - scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, |
4520 - scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, |
4432 - "<%s> is not a valid Jabber ID.", fjid); |
4521 - "<%s> is not a valid Jabber ID.", fjid); |
4440 + type_overwrite = LM_MESSAGE_SUB_TYPE_HEADLINE; |
4529 + type_overwrite = LM_MESSAGE_SUB_TYPE_HEADLINE; |
4441 + |
4530 + |
4442 // We must use the bare jid in hk_message_out() |
4531 // We must use the bare jid in hk_message_out() |
4443 rp = strchr(fjid, JID_RESOURCE_SEPARATOR); |
4532 rp = strchr(fjid, JID_RESOURCE_SEPARATOR); |
4444 if (rp) |
4533 if (rp) |
4445 @@ -1354,8 +2124,7 @@ |
4534 @@ -1354,8 +2210,7 @@ |
4446 // send_message(msg, subj, type_overwrite) |
4535 // send_message(msg, subj, type_overwrite) |
4447 // Write the message in the buddy's window and send the message on |
4536 // Write the message in the buddy's window and send the message on |
4448 // the network. |
4537 // the network. |
4449 -static void send_message(const char *msg, const char *subj, |
4538 -static void send_message(const char *msg, const char *subj, |
4450 - LmMessageSubType type_overwrite) |
4539 - LmMessageSubType type_overwrite) |
4451 +static void send_message(const char *msg, const char *subj, msgtype_t msgtype) |
4540 +static void send_message(const char *msg, const char *subj, msgtype_t msgtype) |
4452 { |
4541 { |
4453 const char *bjid; |
4542 const char *bjid; |
4454 char *jid; |
4543 char *jid; |
4455 @@ -1378,34 +2147,13 @@ |
4544 @@ -1378,34 +2233,13 @@ |
4456 else |
4545 else |
4457 jid = g_strdup(bjid); |
4546 jid = g_strdup(bjid); |
4458 |
4547 |
4459 - send_message_to(jid, msg, subj, type_overwrite, FALSE); |
4548 - send_message_to(jid, msg, subj, type_overwrite, FALSE); |
4460 + send_message_to(jid, msg, subj, msgtype, FALSE); |
4549 + send_message_to(jid, msg, subj, msgtype, FALSE); |
4487 gpointer bud; |
4576 gpointer bud; |
4488 - LmMessageSubType msgtype = LM_MESSAGE_SUB_TYPE_NOT_SET; |
4577 - LmMessageSubType msgtype = LM_MESSAGE_SUB_TYPE_NOT_SET; |
4489 |
4578 |
4490 scr_set_chatmode(TRUE); |
4579 scr_set_chatmode(TRUE); |
4491 scr_show_buddy_window(); |
4580 scr_show_buddy_window(); |
4492 @@ -1424,135 +2172,195 @@ |
4581 @@ -1424,140 +2258,200 @@ |
4493 } |
4582 } |
4494 |
4583 |
4495 buddy_setflags(bud, ROSTER_FLAG_LOCK, TRUE); |
4584 buddy_setflags(bud, ROSTER_FLAG_LOCK, TRUE); |
4496 - if (parse_flags) |
4585 - if (parse_flags) |
4497 - msgtype = scan_mtype(&arg); |
4586 - msgtype = scan_mtype(&arg); |
4777 +// |
4866 +// |
4778 + |
4867 + |
4779 // load_message_from_file(filename) |
4868 // load_message_from_file(filename) |
4780 // Read the whole content of a file. |
4869 // Read the whole content of a file. |
4781 // The data are converted to UTF8, they should be freed by the caller after |
4870 // The data are converted to UTF8, they should be freed by the caller after |
4782 @@ -1566,7 +2374,7 @@ |
4871 // use. |
4872 -char *load_message_from_file(const char *filename) |
|
4873 +char *load_message_from_file(const char *filename, const char *localfn) |
|
4874 { |
|
4875 FILE *fd; |
|
4876 struct stat buf; |
|
4877 @@ -1566,7 +2460,7 @@ |
|
4783 char *next_utf8_char; |
4878 char *next_utf8_char; |
4784 size_t len; |
4879 size_t len; |
4785 |
4880 |
4786 - fd = fopen(filename, "r"); |
4881 - fd = fopen(filename, "r"); |
4787 + fd = fopen(filename, "r"); // FIXME g_from_utf8 |
4882 + fd = fopen(localfn, "r"); |
4788 |
4883 |
4789 if (!fd || fstat(fileno(fd), &buf)) { |
4884 if (!fd || fstat(fileno(fd), &buf)) { |
4790 scr_LogPrint(LPRINT_LOGNORM, "Cannot open message file (%s)", filename); |
4885 scr_LogPrint(LPRINT_LOGNORM, "Cannot open message file (%s)", filename); |
4791 @@ -1632,134 +2440,90 @@ |
4886 @@ -1632,273 +2526,314 @@ |
4792 return msgbuf_utf8; |
4887 return msgbuf_utf8; |
4793 } |
4888 } |
4794 |
4889 |
4795 -static void do_say_to(char *arg) |
4890 -static void do_say_to(char *arg) |
4796 +static gchar *do_say_to (const cmdopts_t *command, cmdarg_value_t *values); |
4891 +static gchar *do_say_to (const cmdopts_t *command, cmdarg_value_t *values); |
4802 + pos_sayto_quiet = 3, |
4897 + pos_sayto_quiet = 3, |
4803 + pos_sayto_esc = 4, |
4898 + pos_sayto_esc = 4, |
4804 + pos_sayto_file = 5, |
4899 + pos_sayto_file = 5, |
4805 +} pos_sayto_t; |
4900 +} pos_sayto_t; |
4806 + |
4901 + |
4807 +cmdopts_t options = { |
4902 +static cmdopts_t def_say_to = { |
4808 + "say_to", |
4903 + "say_to", |
4809 + cmd_default, |
4904 + cmd_default, |
4810 + cmd_check_online, |
4905 + cmd_check_online, |
4811 + do_say_to, |
4906 + do_say_to, |
4812 + (cmdopt_t[7]){ |
4907 + (cmdopt_t[7]){ |
4909 + gchar *freeme2 = NULL; // msg |
5004 + gchar *freeme2 = NULL; // msg |
4910 + msgtype_t msg_type = (msgtype_t) (values[pos_sayto_msgtype].src -> userdata); |
5005 + msgtype_t msg_type = (msgtype_t) (values[pos_sayto_msgtype].src -> userdata); |
4911 + |
5006 + |
4912 + fjid = values[pos_sayto_jid].value.arg; |
5007 + fjid = values[pos_sayto_jid].value.arg; |
4913 + msg = values[pos_sayto_msg].value.arg; |
5008 + msg = values[pos_sayto_msg].value.arg; |
4914 + file = values[pos_sayto_file].value.arg; |
5009 + file = values[pos_sayto_file].value.fname.utf8; |
4915 + |
5010 + |
4916 + // XXX this is not yet in default fjid checker. should we add it there? |
5011 + // XXX this is not yet in default fjid checker. should we add it there? |
4917 if (!strchr(fjid, JID_DOMAIN_SEPARATOR)) { |
5012 if (!strchr(fjid, JID_DOMAIN_SEPARATOR)) { |
4918 const gchar *append_server = settings_opt_get("default_server"); |
5013 const gchar *append_server = settings_opt_get("default_server"); |
4919 if (append_server) { |
5014 if (append_server) { |
4960 scr_LogPrint(LPRINT_NORMAL, "say_to: extra parameter ignored."); |
5055 scr_LogPrint(LPRINT_NORMAL, "say_to: extra parameter ignored."); |
4961 - filename_xp = expand_filename(file); |
5056 - filename_xp = expand_filename(file); |
4962 - msg = msg_utf8 = load_message_from_file(filename_xp); |
5057 - msg = msg_utf8 = load_message_from_file(filename_xp); |
4963 - g_free(filename_xp); |
5058 - g_free(filename_xp); |
4964 - g_free(file); |
5059 - g_free(file); |
4965 + freeme2 = msg = load_message_from_file(values[pos_sayto_file].value.arg); |
5060 + freeme2 = msg = load_message_from_file(file, |
5061 + values[pos_sayto_file].value.fname.local); |
|
4966 } |
5062 } |
4967 |
5063 |
4968 - send_message_to(fjid, msg, NULL, msg_type, quiet); |
5064 - send_message_to(fjid, msg, NULL, msg_type, quiet); |
4969 - |
5065 - |
4970 - g_free(uncompletedfjid); |
5066 - g_free(uncompletedfjid); |
4978 + g_free(freeme2); |
5074 + g_free(freeme2); |
4979 + |
5075 + |
4980 + return NULL; |
5076 + return NULL; |
4981 } |
5077 } |
4982 |
5078 |
4983 +#if 0 |
5079 -// buffer_updown(updown, nblines) |
4984 // buffer_updown(updown, nblines) |
5080 -// updown: -1=up, +1=down |
4985 // updown: -1=up, +1=down |
5081 -inline static void buffer_updown(int updown, char *nlines) |
4986 inline static void buffer_updown(int updown, char *nlines) |
5082 +// |
4987 @@ -1775,27 +2539,10 @@ |
5083 +// /buffer |
4988 scr_buffer_scroll_up_down(updown, nblines); |
5084 +// |
5085 + |
|
5086 +// argument type |
|
5087 + |
|
5088 +// Wrapper over uint to check maximum |
|
5089 +// XXX: |
|
5090 +// * use chkdata in uint checker for that? |
|
5091 +static gchar *cmdarg_check_buffer_percent (cmdarg_value_t *value) |
|
5092 { |
|
5093 - int nblines; |
|
5094 - |
|
5095 - if (!nlines || !*nlines) |
|
5096 - nblines = 0; |
|
5097 - else |
|
5098 - nblines = strtol(nlines, NULL, 10); |
|
5099 - |
|
5100 - if (nblines >= 0) |
|
5101 - scr_buffer_scroll_up_down(updown, nblines); |
|
5102 + gchar *error; |
|
5103 + |
|
5104 + if (!(error = cmdarg_check_uint (value))) { |
|
5105 + if (value -> value.uint > 100) { |
|
5106 + error = g_strdup_printf ("Percent value %u is greater than 100.", value -> value.uint); |
|
5107 + value -> value.uint = 0; |
|
5108 + } |
|
5109 + } |
|
5110 + |
|
5111 + return error; |
|
4989 } |
5112 } |
4990 |
5113 |
4991 -static void buffer_search(int direction, char *arg) |
5114 -static void buffer_search(int direction, char *arg) |
4992 -{ |
5115 +static cmdarg_type_t cmdarg_type_buffer_percent = { |
5116 + cmdarg_check_buffer_percent, |
|
5117 + NULL, |
|
5118 + NULL, |
|
5119 +}; |
|
5120 + |
|
5121 +// command |
|
5122 + |
|
5123 +static gchar *do_buffer (const cmdopts_t *command, cmdarg_value_t *values); |
|
5124 + |
|
5125 +typedef enum { |
|
5126 + scmd_buffer_close, scmd_buffer_close_all, |
|
5127 + scmd_buffer_clear, scmd_buffer_purge, |
|
5128 + scmd_buffer_list, |
|
5129 + scmd_buffer_top, scmd_buffer_bottom, scmd_buffer_up, scmd_buffer_down, |
|
5130 + scmd_buffer_date, scmd_buffer_percent, scmd_buffer_readmark, |
|
5131 + scmd_buffer_search_backward, scmd_buffer_search_forward, |
|
5132 + scmd_buffer_scroll_lock, scmd_buffer_scroll_unlock, |
|
5133 + scmd_buffer_scroll_toggle, |
|
5134 + scmd_buffer_save, |
|
5135 +} scmd_buffer_t; |
|
5136 + |
|
5137 +typedef enum { |
|
5138 + pos_buffer_scmd = 0, |
|
5139 + pos_buffer_jid = 1, |
|
5140 + pos_buffer_n = 1, |
|
5141 + pos_buffer_date = 1, |
|
5142 + pos_buffer_percent = 1, |
|
5143 + pos_buffer_text = 1, |
|
5144 + pos_buffer_file = 1, |
|
5145 +} pos_buffer_t; |
|
5146 + |
|
5147 +static cmdopts_t def_buffer = { |
|
5148 + "buffer", |
|
5149 + cmd_default, |
|
5150 + cmd_check_current_buddy, |
|
5151 + do_buffer, |
|
5152 + NULL, |
|
5153 + (cmdarg_t[2]){ |
|
5154 + { "subcommand", pos_buffer_scmd, cmdarg_subcmd|cmdarg_chreq, NULL, NULL }, |
|
5155 + {NULL}, |
|
5156 + }, |
|
5157 + (cmdopts_t[19]){ |
|
5158 + { "close", cmd_default, NULL, NULL, NULL, |
|
5159 + (cmdarg_t[2]){ |
|
5160 + { "jid", pos_buffer_jid, cmdarg_required, NULL, &cmdarg_type_roster_bjid, (gpointer)(ROSTER_TYPE_USER|ROSTER_TYPE_ROOM|ROSTER_TYPE_AGENT|ROSTER_TYPE_SPECIAL) }, |
|
5161 + {NULL} |
|
5162 + }, |
|
5163 + NULL, (gpointer)scmd_buffer_close }, |
|
5164 + { "close_all", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_close_all }, |
|
5165 + { "clear", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_clear }, |
|
5166 + { "purge", cmd_default, NULL, NULL, NULL, |
|
5167 + (cmdarg_t[2]){ |
|
5168 + { "jid", pos_buffer_jid, cmdarg_required, NULL, &cmdarg_type_roster_bjid, (gpointer)(ROSTER_TYPE_USER|ROSTER_TYPE_ROOM|ROSTER_TYPE_AGENT|ROSTER_TYPE_SPECIAL) }, |
|
5169 + {0} |
|
5170 + }, |
|
5171 + NULL, (gpointer)scmd_buffer_purge }, |
|
5172 + { "list", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_list }, |
|
5173 + { "top", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_top }, |
|
5174 + { "bottom", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_bottom }, |
|
5175 + { "up", cmd_default, NULL, NULL, NULL, |
|
5176 + (cmdarg_t[2]){ |
|
5177 + { "n", pos_buffer_n, cmdarg_chreq, "0", &cmdarg_type_uint }, |
|
5178 + {NULL} |
|
5179 + }, |
|
5180 + NULL, (gpointer)scmd_buffer_up }, |
|
5181 + { "down", cmd_default, NULL, NULL, NULL, |
|
5182 + (cmdarg_t[2]){ |
|
5183 + { "n", pos_buffer_n, cmdarg_chreq, "0", &cmdarg_type_uint }, |
|
5184 + {NULL} |
|
5185 + }, |
|
5186 + NULL, (gpointer)scmd_buffer_down }, |
|
5187 + { "date", cmd_default, NULL, NULL, NULL, |
|
5188 + (cmdarg_t[2]){ |
|
5189 + { "date", pos_buffer_date, cmdarg_chreq, "1", &cmdarg_type_date }, |
|
5190 + {NULL} |
|
5191 + }, |
|
5192 + NULL, (gpointer)scmd_buffer_date }, |
|
5193 + { "%", cmd_default, NULL, NULL, NULL, |
|
5194 + (cmdarg_t[2]){ |
|
5195 + { "percent", pos_buffer_percent, cmdarg_chreq, "100", &cmdarg_type_buffer_percent }, |
|
5196 + {NULL} |
|
5197 + }, |
|
5198 + NULL, (gpointer)scmd_buffer_percent }, |
|
5199 + { "readmark", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_readmark }, |
|
5200 + { "search_backward", cmd_default, NULL, NULL, NULL, |
|
5201 + (cmdarg_t[2]){ |
|
5202 + { "text", pos_buffer_text, cmdarg_chreq, NULL, &cmdarg_type_nonspace }, |
|
5203 + {NULL} |
|
5204 + }, |
|
5205 + NULL, (gpointer)scmd_buffer_search_backward }, |
|
5206 + { "search_forward", cmd_default, NULL, NULL, NULL, |
|
5207 + (cmdarg_t[2]){ |
|
5208 + { "text", pos_buffer_text, cmdarg_chreq, NULL, &cmdarg_type_nonspace }, |
|
5209 + {NULL} |
|
5210 + }, |
|
5211 + NULL, (gpointer)scmd_buffer_search_forward }, |
|
5212 + { "scroll_lock", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_scroll_lock }, |
|
5213 + { "scroll_unlock", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_scroll_unlock }, |
|
5214 + { "scroll_toggle", cmd_default, NULL, NULL, NULL, NULL, NULL, (gpointer)scmd_buffer_scroll_toggle }, |
|
5215 + { "save", cmd_default, NULL, NULL, NULL, |
|
5216 + (cmdarg_t[2]){ |
|
5217 + { "filename", pos_buffer_file, cmdarg_chreq, NULL, &cmdarg_type_filename }, |
|
5218 + {NULL} |
|
5219 + }, |
|
5220 + NULL, (gpointer)scmd_buffer_save }, |
|
5221 + }, |
|
5222 +}; |
|
5223 + |
|
5224 +// XXX % command before was able to handle %50 |
|
5225 +static gchar *do_buffer (const cmdopts_t *command, cmdarg_value_t *values) |
|
5226 { |
|
4993 - if (!arg || !*arg) { |
5227 - if (!arg || !*arg) { |
4994 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
5228 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
4995 - return; |
5229 - return; |
4996 - } |
5230 + scmd_buffer_t subcmd = (scmd_buffer_t) (values[pos_buffer_scmd].value.cmd -> userdata); |
4997 - |
5231 + |
5232 + if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_GROUP && |
|
5233 + subcmd != scmd_buffer_close_all) { |
|
5234 + return g_strdup ("Groups have no buffer."); |
|
5235 } |
|
5236 |
|
4998 - scr_buffer_search(direction, arg); |
5237 - scr_buffer_search(direction, arg); |
4999 -} |
5238 + if (subcmd == scmd_buffer_close) { |
5000 - |
5239 + scr_buffer_purge(1, buddy_getjid(values[pos_buffer_jid].value.rjid.bud)); |
5001 static void buffer_date(char *date) |
5240 + } else if (subcmd == scmd_buffer_close_all) { |
5241 + scr_buffer_purge_all(1); |
|
5242 + } else if (subcmd == scmd_buffer_clear) { |
|
5243 + scr_buffer_clear(); |
|
5244 + } else if (subcmd == scmd_buffer_purge) { |
|
5245 + scr_buffer_purge(0, buddy_getjid(values[pos_buffer_jid].value.rjid.bud)); |
|
5246 + } else if (subcmd == scmd_buffer_list) { |
|
5247 + scr_buffer_list(); |
|
5248 + } else if (subcmd == scmd_buffer_top) { |
|
5249 + scr_buffer_top_bottom(-1); |
|
5250 + } else if (subcmd == scmd_buffer_bottom) { |
|
5251 + scr_buffer_top_bottom(1); |
|
5252 + } else if (subcmd == scmd_buffer_up) { |
|
5253 + scr_buffer_scroll_up_down(-1, values[pos_buffer_n].value.uint); |
|
5254 + } else if (subcmd == scmd_buffer_down) { |
|
5255 + scr_buffer_scroll_up_down(1, values[pos_buffer_n].value.uint); |
|
5256 + } else if (subcmd == scmd_buffer_date) { |
|
5257 + scr_buffer_date(values[pos_buffer_date].value.time); |
|
5258 + } else if (subcmd == scmd_buffer_percent) { |
|
5259 + scr_buffer_percent(values[pos_buffer_percent].value.uint); |
|
5260 + } else if (subcmd == scmd_buffer_readmark) { |
|
5261 + scr_buffer_jump_readmark(); |
|
5262 + } else if (subcmd == scmd_buffer_search_backward) { |
|
5263 + scr_buffer_search(-1, values[pos_buffer_text].value.arg); |
|
5264 + } else if (subcmd == scmd_buffer_search_forward) { |
|
5265 + scr_buffer_search(1, values[pos_buffer_text].value.arg); |
|
5266 + } else if (subcmd == scmd_buffer_scroll_lock) { |
|
5267 + scr_buffer_scroll_lock(1); |
|
5268 + } else if (subcmd == scmd_buffer_scroll_unlock) { |
|
5269 + scr_buffer_scroll_lock(0); |
|
5270 + } else if (subcmd == scmd_buffer_scroll_toggle) { |
|
5271 + scr_buffer_scroll_lock(-1); |
|
5272 + } else { // scmd_buffer_save |
|
5273 + scr_buffer_dump(values[pos_buffer_file].value.fname.local); |
|
5274 + } |
|
5275 + |
|
5276 + return NULL; |
|
5277 } |
|
5278 |
|
5279 -static void buffer_date(char *date) |
|
5280 +// |
|
5281 +// /clear |
|
5282 +// |
|
5283 + |
|
5284 +// XXX convert to real alias? |
|
5285 +static gchar *do_clear (const cmdopts_t *command, cmdarg_value_t *values); |
|
5286 + |
|
5287 +static cmdopts_t def_clear = { |
|
5288 + "clear", |
|
5289 + cmd_default, |
|
5290 + cmd_check_current_buddy, |
|
5291 + do_clear, |
|
5292 + NULL, |
|
5293 + NULL, |
|
5294 + NULL, |
|
5295 +}; |
|
5296 + |
|
5297 +// Alias for "buffer clear" |
|
5298 +static gchar *do_clear(const cmdopts_t *command, cmdarg_value_t *values) |
|
5002 { |
5299 { |
5003 time_t t; |
5300 - time_t t; |
5004 |
5301 - |
5005 - if (!date || !*date) { |
5302 - if (!date || !*date) { |
5006 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
5303 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
5007 - return; |
5304 - return; |
5008 - } |
5305 - } |
5009 - |
5306 - |
5010 - strip_arg_special_chars(date); |
5307 - strip_arg_special_chars(date); |
5011 - |
5308 - |
5012 t = from_iso8601(date, 0); |
5309 - t = from_iso8601(date, 0); |
5013 if (t) |
5310 - if (t) |
5014 scr_buffer_date(t); |
5311 - scr_buffer_date(t); |
5015 @@ -1804,98 +2551,156 @@ |
5312 - else |
5016 "not correctly formatted or invalid."); |
5313 - scr_LogPrint(LPRINT_NORMAL, "The date you specified is " |
5314 - "not correctly formatted or invalid."); |
|
5315 + scr_buffer_clear(); |
|
5316 + return NULL; |
|
5017 } |
5317 } |
5018 |
5318 |
5019 -static void buffer_percent(char *arg1, char *arg2) |
5319 -static void buffer_percent(char *arg1, char *arg2) |
5020 +// XXX % command before was able to handle %50 |
5320 -{ |
5021 +static void do_buffer(char *arg) |
|
5022 { |
|
5023 - // Basically, user has typed "%arg1 arg2" |
5321 - // Basically, user has typed "%arg1 arg2" |
5024 - // "%50" -> arg1 = 50, arg2 null pointer |
5322 - // "%50" -> arg1 = 50, arg2 null pointer |
5025 - // "% 50" -> arg1 = \0, arg2 = 50 |
5323 - // "% 50" -> arg1 = \0, arg2 = 50 |
5026 - |
5324 - |
5027 - if (!*arg1 && (!arg2 || !*arg2)) { // No value |
5325 - if (!*arg1 && (!arg2 || !*arg2)) { // No value |
5028 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
5326 - scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); |
5029 + enum buffer_scmd_t { |
5327 - return; |
5030 + buffer_scmd_close, buffer_scmd_close_all, |
5328 - } |
5031 + buffer_scmd_clear, buffer_scmd_purge, |
5329 - |
5032 + buffer_scmd_list, |
|
5033 + buffer_scmd_top, buffer_scmd_bottom, buffer_scmd_up, buffer_scmd_down, |
|
5034 + buffer_scmd_date, buffer_scmd_percent, buffer_scmd_readmark, |
|
5035 + buffer_scmd_search_backward, buffer_scmd_search_forward, |
|
5036 + buffer_scmd_scroll_lock, buffer_scmd_scroll_unlock, |
|
5037 + buffer_scmd_scroll_toggle, |
|
5038 + buffer_scmd_save, |
|
5039 + } subcmd; |
|
5040 + cmdopts_t options = { |
|
5041 + "buffer", |
|
5042 + NULL, |
|
5043 + (cmdarg_t[1]){ |
|
5044 + { CMDOPT_REQUIRED | CMDOPT_SUBCOMMAND | CMDOPT_LAST, { .cmd = NULL } }, |
|
5045 + }, |
|
5046 + (cmdopts_t[18]){ |
|
5047 + { "close", |
|
5048 + (cmdopt_t[1]){ |
|
5049 + { CMDOPT_SWITCH | CMDOPT_LAST, 'a', "all", { .swc = 0 } } |
|
5050 + }, |
|
5051 + (cmdarg_t[1]){ |
|
5052 + { CMDOPT_LAST, { .cmd = NULL } } // jid |
|
5053 + }, |
|
5054 + NULL, (gpointer)buffer_scmd_close, 0 }, |
|
5055 + { "close_all", NULL, NULL, NULL, (gpointer)buffer_scmd_close_all, 0 }, |
|
5056 + { "clear", NULL, NULL, NULL, (gpointer)buffer_scmd_clear, 0 }, |
|
5057 + { "purge", NULL, |
|
5058 + (cmdarg_t[1]){ |
|
5059 + { CMDOPT_LAST, { .arg = NULL } }, // jid |
|
5060 + }, |
|
5061 + NULL, (gpointer)buffer_scmd_purge, 0 }, |
|
5062 + { "list", NULL, NULL, NULL, (gpointer)buffer_scmd_list, 0 }, |
|
5063 + { "top", NULL, NULL, NULL, (gpointer)buffer_scmd_top, 0 }, |
|
5064 + { "bottom", NULL, NULL, NULL, (gpointer)buffer_scmd_bottom, 0 }, |
|
5065 + { "up", NULL, |
|
5066 + (cmdarg_t[1]){ |
|
5067 + { CMDOPT_LAST, { .arg = NULL } }, // lines |
|
5068 + }, |
|
5069 + NULL, (gpointer)buffer_scmd_up, 0 }, |
|
5070 + { "down", NULL, |
|
5071 + (cmdarg_t[1]){ |
|
5072 + { CMDOPT_LAST, { .arg = NULL } }, // lines |
|
5073 + }, |
|
5074 + NULL, (gpointer)buffer_scmd_down, 0 }, |
|
5075 + { "date", NULL, |
|
5076 + (cmdarg_t[1]){ |
|
5077 + // date |
|
5078 + { CMDOPT_CATCHALL | CMDOPT_REQUIRED | CMDOPT_LAST, { .arg = "1" } }, |
|
5079 + }, |
|
5080 + NULL, (gpointer)buffer_scmd_date, 0 }, |
|
5081 + { "%", NULL, |
|
5082 + (cmdarg_t[1]){ |
|
5083 + { CMDOPT_REQUIRED | CMDOPT_LAST, { .arg = "100" } }, // percent |
|
5084 + }, |
|
5085 + NULL, (gpointer)buffer_scmd_percent, 0 }, |
|
5086 + { "readmark", NULL, NULL, NULL, (gpointer)buffer_scmd_readmark, 0 }, |
|
5087 + { "search_backward", NULL, |
|
5088 + (cmdarg_t[1]){ |
|
5089 + { CMDOPT_REQUIRED | CMDOPT_CATCHALL | CMDOPT_LAST, |
|
5090 + { .arg = NULL } }, |
|
5091 + }, |
|
5092 + NULL, (gpointer)buffer_scmd_search_backward, 0 }, |
|
5093 + { "search_forward", NULL, |
|
5094 + (cmdarg_t[1]){ |
|
5095 + { CMDOPT_REQUIRED | CMDOPT_CATCHALL | CMDOPT_LAST, |
|
5096 + { .arg = NULL } }, |
|
5097 + }, |
|
5098 + NULL, (gpointer)buffer_scmd_search_forward, 0 }, |
|
5099 + { "scroll_lock", NULL, NULL, NULL, |
|
5100 + (gpointer)buffer_scmd_scroll_lock, 0 }, |
|
5101 + { "scroll_unlock", NULL, NULL, NULL, |
|
5102 + (gpointer)buffer_scmd_scroll_unlock, 0 }, |
|
5103 + { "scroll_toggle", NULL, NULL, NULL, |
|
5104 + (gpointer)buffer_scmd_scroll_toggle, 0 }, |
|
5105 + { "save", NULL, |
|
5106 + (cmdarg_t[1]){ |
|
5107 + { CMDOPT_REQUIRED | CMDOPT_CATCHALL | CMDOPT_PLAIN | CMDOPT_LAST, |
|
5108 + { .arg = NULL } }, |
|
5109 + }, |
|
5110 + NULL, (gpointer)buffer_scmd_save, CMDOPT_LAST }, |
|
5111 + }, |
|
5112 + }; |
|
5113 + |
|
5114 + if (!current_buddy) |
|
5115 + return; |
|
5116 + |
|
5117 + if (cmdopts_parse(arg, &options)) |
|
5118 + return; |
|
5119 + |
|
5120 + subcmd = (enum buffer_scmd_t) options.args[0].value.cmd -> userdata; |
|
5121 + |
|
5122 + if (subcmd == buffer_scmd_close && options.cmds[0].opts[0].value.swc) |
|
5123 + subcmd = buffer_scmd_close_all; |
|
5124 + |
|
5125 + if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_GROUP && |
|
5126 + subcmd != buffer_scmd_close_all) { |
|
5127 + scr_LogPrint(LPRINT_NORMAL, "Groups have no buffer."); |
|
5128 + cmdopts_free(&options); |
|
5129 return; |
|
5130 } |
|
5131 |
|
5132 - if (*arg1 && arg2 && *arg2) { // Two values |
5330 - if (*arg1 && arg2 && *arg2) { // Two values |
5133 - scr_LogPrint(LPRINT_NORMAL, "Wrong parameters."); |
5331 - scr_LogPrint(LPRINT_NORMAL, "Wrong parameters."); |
5134 - return; |
5332 - return; |
5135 + if (subcmd == buffer_scmd_close) { |
5333 - } |
5136 + scr_buffer_purge(1, options.cmds[0].args[0].value.arg); |
5334 - |
5137 + } else if (subcmd == buffer_scmd_close_all) { |
|
5138 + scr_buffer_purge_all(1); |
|
5139 + } else if (subcmd == buffer_scmd_clear) { |
|
5140 + scr_buffer_clear(); |
|
5141 + } else if (subcmd == buffer_scmd_purge) { |
|
5142 + scr_buffer_purge(0, options.cmds[3].args[0].value.arg); |
|
5143 + } else if (subcmd == buffer_scmd_list) { |
|
5144 + scr_buffer_list(); |
|
5145 + } else if (subcmd == buffer_scmd_top) { |
|
5146 + scr_buffer_top_bottom(-1); |
|
5147 + } else if (subcmd == buffer_scmd_bottom) { |
|
5148 + scr_buffer_top_bottom(1); |
|
5149 + } else if (subcmd == buffer_scmd_up) { |
|
5150 + buffer_updown(-1, options.cmds[7].args[0].value.arg); |
|
5151 + } else if (subcmd == buffer_scmd_down) { |
|
5152 + buffer_updown(1, options.cmds[8].args[0].value.arg); |
|
5153 + } else if (subcmd == buffer_scmd_date) { |
|
5154 + buffer_date(options.cmds[9].args[0].value.arg); |
|
5155 + } else if (subcmd == buffer_scmd_percent) { |
|
5156 + scr_buffer_percent(atoi(options.cmds[10].args[0].value.arg)); |
|
5157 + } else if (subcmd == buffer_scmd_readmark) { |
|
5158 + scr_buffer_jump_readmark(); |
|
5159 + } else if (subcmd == buffer_scmd_search_backward) { |
|
5160 + scr_buffer_search(-1, options.cmds[12].args[0].value.arg); |
|
5161 + } else if (subcmd == buffer_scmd_search_forward) { |
|
5162 + scr_buffer_search(1, options.cmds[13].args[0].value.arg); |
|
5163 + } else if (subcmd == buffer_scmd_scroll_lock) { |
|
5164 + scr_buffer_scroll_lock(1); |
|
5165 + } else if (subcmd == buffer_scmd_scroll_unlock) { |
|
5166 + scr_buffer_scroll_lock(0); |
|
5167 + } else if (subcmd == buffer_scmd_scroll_toggle) { |
|
5168 + scr_buffer_scroll_lock(-1); |
|
5169 + } else { // buffer_scmd_save |
|
5170 + scr_buffer_dump(options.cmds[17].args[0].value.arg); |
|
5171 } |
|
5172 |
|
5173 - scr_buffer_percent(atoi((*arg1 ? arg1 : arg2))); |
5335 - scr_buffer_percent(atoi((*arg1 ? arg1 : arg2))); |
5174 -} |
5336 -} |
5175 - |
5337 - |
5176 -static void do_buffer(char *arg) |
5338 -static void do_buffer(char *arg) |
5177 -{ |
5339 -{ |
5239 - } else { |
5401 - } else { |
5240 - scr_LogPrint(LPRINT_NORMAL, "Unrecognized parameter!"); |
5402 - scr_LogPrint(LPRINT_NORMAL, "Unrecognized parameter!"); |
5241 - } |
5403 - } |
5242 - |
5404 - |
5243 - free_arg_lst(paramlst); |
5405 - free_arg_lst(paramlst); |
5244 + cmdopts_free(&options); |
5406 -} |
5407 - |
|
5408 -static void do_clear(char *arg) // Alias for "buffer clear" |
|
5409 -{ |
|
5410 - do_buffer("clear"); |
|
5411 -} |
|
5412 - |
|
5413 -static void do_info(char *arg) |
|
5414 +// |
|
5415 +// /info |
|
5416 +// |
|
5417 + |
|
5418 +static gchar *do_info (const cmdopts_t *command, cmdarg_value_t *values); |
|
5419 + |
|
5420 +static cmdopts_t def_info = { |
|
5421 + "clear", |
|
5422 + cmd_default, |
|
5423 + cmd_check_current_buddy, |
|
5424 + do_info, |
|
5425 + NULL, |
|
5426 + NULL, |
|
5427 + NULL, |
|
5428 +}; |
|
5429 + |
|
5430 +static gchar *do_info (const cmdopts_t *command, cmdarg_value_t *values) |
|
5431 { |
|
5432 gpointer bud; |
|
5433 const char *bjid, *name; |
|
5434 @@ -1906,9 +2841,7 @@ |
|
5435 char *buffer; |
|
5436 enum subscr esub; |
|
5437 |
|
5438 - if (!current_buddy) |
|
5439 - return; |
|
5440 - bud = BUDDATA(current_buddy); |
|
5441 + bud = BUDDATA(current_buddy); |
|
5442 |
|
5443 bjid = buddy_getjid(bud); |
|
5444 name = buddy_getname(bud); |
|
5445 @@ -2031,31 +2964,25 @@ |
|
5446 HBB_PREFIX_INFO, 0); |
|
5447 } |
|
5448 } |
|
5449 + |
|
5450 + return NULL; |
|
5245 } |
5451 } |
5246 |
5452 |
5247 static void do_clear(char *arg) // Alias for "buffer clear" |
5453 +#if 0 |
5248 { |
|
5249 - do_buffer("clear"); |
|
5250 + scr_buffer_clear(); |
|
5251 } |
|
5252 |
|
5253 static void do_info(char *arg) |
|
5254 @@ -2033,29 +2838,20 @@ |
|
5255 } |
|
5256 } |
|
5257 |
|
5258 +enum room_names_style_t { |
5454 +enum room_names_style_t { |
5259 + room_names_style_normal = 0, |
5455 + room_names_style_normal = 0, |
5260 + room_names_style_detail, |
5456 + room_names_style_detail, |
5261 + room_names_style_short, |
5457 + room_names_style_short, |
5262 + room_names_style_quiet, |
5458 + room_names_style_quiet, |
5288 - } |
5484 - } |
5289 - } |
5485 - } |
5290 |
5486 |
5291 // Enter chat mode |
5487 // Enter chat mode |
5292 scr_set_chatmode(TRUE); |
5488 scr_set_chatmode(TRUE); |
5293 @@ -2075,12 +2871,12 @@ |
5489 @@ -2075,12 +3002,12 @@ |
5294 rstatus = buddy_getstatus(bud, p_res->data); |
5490 rstatus = buddy_getstatus(bud, p_res->data); |
5295 rst_msg = buddy_getstatusmsg(bud, p_res->data); |
5491 rst_msg = buddy_getstatusmsg(bud, p_res->data); |
5296 |
5492 |
5297 - if (style == style_short) { |
5493 - if (style == style_short) { |
5298 + if (style == room_names_style_short) { |
5494 + if (style == room_names_style_short) { |
5303 - } else if (style == style_compact) { |
5499 - } else if (style == style_compact) { |
5304 + } else if (style == room_names_style_compact) { |
5500 + } else if (style == room_names_style_compact) { |
5305 enum imrole role = buddy_getrole(bud, p_res->data); |
5501 enum imrole role = buddy_getrole(bud, p_res->data); |
5306 enum imaffiliation affil = buddy_getaffil(bud, p_res->data); |
5502 enum imaffiliation affil = buddy_getaffil(bud, p_res->data); |
5307 bool showaffil = (affil != affil_none); |
5503 bool showaffil = (affil != affil_none); |
5308 @@ -2096,12 +2892,12 @@ |
5504 @@ -2096,12 +3023,12 @@ |
5309 snprintf(buffer, 4095, "[%c] %s", imstatus2char[rstatus], |
5505 snprintf(buffer, 4095, "[%c] %s", imstatus2char[rstatus], |
5310 (char*)p_res->data); |
5506 (char*)p_res->data); |
5311 scr_WriteIncomingMessage(bjid, buffer, 0, HBB_PREFIX_INFO, 0); |
5507 scr_WriteIncomingMessage(bjid, buffer, 0, HBB_PREFIX_INFO, 0); |
5312 - if (rst_msg && style != style_quiet) { |
5508 - if (rst_msg && style != style_quiet) { |
5313 + if (rst_msg && style != room_names_style_quiet) { |
5509 + if (rst_msg && style != room_names_style_quiet) { |
5318 - if (style == style_detail) { |
5514 - if (style == style_detail) { |
5319 + if (style == room_names_style_detail) { |
5515 + if (style == room_names_style_detail) { |
5320 enum imrole role = buddy_getrole(bud, p_res->data); |
5516 enum imrole role = buddy_getrole(bud, p_res->data); |
5321 enum imaffiliation affil = buddy_getaffil(bud, p_res->data); |
5517 enum imaffiliation affil = buddy_getaffil(bud, p_res->data); |
5322 |
5518 |
5323 @@ -2145,16 +2941,69 @@ |
5519 @@ -2145,16 +3072,69 @@ |
5324 |
5520 |
5325 static void do_rename(char *arg) |
5521 static void do_rename(char *arg) |
5326 { |
5522 { |
5327 + cmdopts_t options = { |
5523 + cmdopts_t options = { |
5328 + "rename", |
5524 + "rename", |
5393 + } |
5589 + } |
5394 + |
5590 + |
5395 bjid = buddy_getjid(bud); |
5591 bjid = buddy_getjid(bud); |
5396 group = buddy_getgroupname(bud); |
5592 group = buddy_getgroupname(bud); |
5397 type = buddy_gettype(bud); |
5593 type = buddy_gettype(bud); |
5398 @@ -2162,11 +3011,13 @@ |
5594 @@ -2162,11 +3142,13 @@ |
5399 |
5595 |
5400 if (type & ROSTER_TYPE_SPECIAL) { |
5596 if (type & ROSTER_TYPE_SPECIAL) { |
5401 scr_LogPrint(LPRINT_NORMAL, "You can't rename this item."); |
5597 scr_LogPrint(LPRINT_NORMAL, "You can't rename this item."); |
5402 + cmdopts_free(&options); |
5598 + cmdopts_free(&options); |
5403 return; |
5599 return; |
5408 scr_LogPrint(LPRINT_NORMAL, "Please specify a new name."); |
5604 scr_LogPrint(LPRINT_NORMAL, "Please specify a new name."); |
5409 + cmdopts_free(&options); |
5605 + cmdopts_free(&options); |
5410 return; |
5606 return; |
5411 } |
5607 } |
5412 |
5608 |
5413 @@ -2181,90 +3032,117 @@ |
5609 @@ -2181,90 +3163,117 @@ |
5414 // } |
5610 // } |
5415 //} |
5611 //} |
5416 |
5612 |
5417 - newname = g_strdup(arg); |
5613 - newname = g_strdup(arg); |
5418 // Remove trailing space |
5614 // Remove trailing space |
5557 + // We do not move the buddy right now because the server could reject |
5753 + // We do not move the buddy right now because the server could reject |
5558 + // the request. Let's wait for the server answer. |
5754 + // the request. Let's wait for the server answer. |
5559 } else { |
5755 } else { |
5560 // This is a local item, we move it without adding to roster. |
5756 // This is a local item, we move it without adding to roster. |
5561 guint msgflag; |
5757 guint msgflag; |
5562 @@ -2276,7 +3154,7 @@ |
5758 @@ -2276,7 +3285,7 @@ |
5563 msgflag = buddy_getflags(bud) & ROSTER_FLAG_MSG; |
5759 msgflag = buddy_getflags(bud) & ROSTER_FLAG_MSG; |
5564 if (msgflag) |
5760 if (msgflag) |
5565 roster_msg_setflag(bjid, FALSE, FALSE); |
5761 roster_msg_setflag(bjid, FALSE, FALSE); |
5566 - buddy_setgroup(bud, group_utf8); |
5762 - buddy_setgroup(bud, group_utf8); |
5567 + buddy_setgroup(bud, newgroupname); |
5763 + buddy_setgroup(bud, newgroupname); |
5568 if (msgflag) |
5764 if (msgflag) |
5569 roster_msg_setflag(bjid, FALSE, TRUE); |
5765 roster_msg_setflag(bjid, FALSE, TRUE); |
5570 if ((type & ROSTER_TYPE_ROOM) && xmpp_is_bookmarked(bjid) && |
5766 if ((type & ROSTER_TYPE_ROOM) && xmpp_is_bookmarked(bjid) && |
5571 @@ -2285,8 +3163,7 @@ |
5767 @@ -2285,8 +3294,7 @@ |
5572 } |
5768 } |
5573 } |
5769 } |
5574 |
5770 |
5575 - g_free(group_utf8); |
5771 - g_free(group_utf8); |
5576 - g_free(newgroupname); |
5772 - g_free(newgroupname); |
5577 + cmdopts_free(&options); |
5773 + cmdopts_free(&options); |
5578 update_roster = TRUE; |
5774 update_roster = TRUE; |
5579 } |
5775 } |
5580 |
5776 |
5581 @@ -2468,50 +3345,33 @@ |
5777 @@ -2468,50 +3476,33 @@ |
5582 |
5778 |
5583 static void do_rawxml(char *arg) |
5779 static void do_rawxml(char *arg) |
5584 { |
5780 { |
5585 - char **paramlst; |
5781 - char **paramlst; |
5586 - char *subcmd; |
5782 - char *subcmd; |
5647 + lm_connection_send_raw(lconnection, options.cmds[0].args[0].value.arg, NULL); |
5843 + lm_connection_send_raw(lconnection, options.cmds[0].args[0].value.arg, NULL); |
5648 + cmdopts_free(&options); |
5844 + cmdopts_free(&options); |
5649 } |
5845 } |
5650 |
5846 |
5651 // check_room_subcommand(arg, param_needed, buddy_must_be_a_room) |
5847 // check_room_subcommand(arg, param_needed, buddy_must_be_a_room) |
5652 @@ -2815,6 +3675,8 @@ |
5848 @@ -2815,6 +3806,8 @@ |
5653 free_arg_lst(paramlst); |
5849 free_arg_lst(paramlst); |
5654 } |
5850 } |
5655 |
5851 |
5656 +#endif |
5852 +#endif |
5657 + |
5853 + |
5658 void cmd_room_leave(gpointer bud, char *arg) |
5854 void cmd_room_leave(gpointer bud, char *arg) |
5659 { |
5855 { |
5660 gchar *roomid, *desc; |
5856 gchar *roomid, *desc; |
5661 @@ -2833,6 +3695,8 @@ |
5857 @@ -2833,6 +3826,8 @@ |
5662 g_free(roomid); |
5858 g_free(roomid); |
5663 } |
5859 } |
5664 |
5860 |
5665 +#if 0 |
5861 +#if 0 |
5666 + |
5862 + |
5667 static void room_nick(gpointer bud, char *arg) |
5863 static void room_nick(gpointer bud, char *arg) |
5668 { |
5864 { |
5669 if (!buddy_getinsideroom(bud)) { |
5865 if (!buddy_getinsideroom(bud)) { |
5670 @@ -2874,7 +3738,7 @@ |
5866 @@ -2874,7 +3869,7 @@ |
5671 fjid_utf8 = g_strdup_printf("%s/%s", buddy_getjid(bud), nick_utf8); |
5867 fjid_utf8 = g_strdup_printf("%s/%s", buddy_getjid(bud), nick_utf8); |
5672 g_free (nick_utf8); |
5868 g_free (nick_utf8); |
5673 msg = to_utf8(arg); |
5869 msg = to_utf8(arg); |
5674 - send_message_to(fjid_utf8, msg, NULL, LM_MESSAGE_SUB_TYPE_NOT_SET, FALSE); |
5870 - send_message_to(fjid_utf8, msg, NULL, LM_MESSAGE_SUB_TYPE_NOT_SET, FALSE); |
5675 + send_message_to(fjid_utf8, msg, NULL, msgtype_not_set, FALSE); |
5871 + send_message_to(fjid_utf8, msg, NULL, msgtype_not_set, FALSE); |
5676 g_free(fjid_utf8); |
5872 g_free(fjid_utf8); |
5677 g_free(msg); |
5873 g_free(msg); |
5678 free_arg_lst(paramlst); |
5874 free_arg_lst(paramlst); |
5679 @@ -3052,6 +3916,8 @@ |
5875 @@ -3052,6 +4047,8 @@ |
5680 free_arg_lst(paramlst); |
5876 free_arg_lst(paramlst); |
5681 } |
5877 } |
5682 |
5878 |
5683 +#endif |
5879 +#endif |
5684 + |
5880 + |
5685 // cmd_room_whois(..) |
5881 // cmd_room_whois(..) |
5686 // If interactive is TRUE, chatmode can be enabled. |
5882 // If interactive is TRUE, chatmode can be enabled. |
5687 // Please note that usernick is expected in UTF-8 locale iff interactive is |
5883 // Please note that usernick is expected in UTF-8 locale iff interactive is |
5688 @@ -3146,6 +4012,8 @@ |
5884 @@ -3146,6 +4143,8 @@ |
5689 free_arg_lst(paramlst); |
5885 free_arg_lst(paramlst); |
5690 } |
5886 } |
5691 |
5887 |
5692 +#if 0 |
5888 +#if 0 |
5693 + |
5889 + |
5694 static void room_bookmark(gpointer bud, char *arg) |
5890 static void room_bookmark(gpointer bud, char *arg) |
5695 { |
5891 { |
5696 const char *roomid; |
5892 const char *roomid; |
5697 @@ -3290,6 +4158,207 @@ |
5893 @@ -3290,6 +4289,207 @@ |
5698 |
5894 |
5699 static void do_room(char *arg) |
5895 static void do_room(char *arg) |
5700 { |
5896 { |
5701 + enum room_scmd_t { |
5897 + enum room_scmd_t { |
5702 + room_scmd_join, room_scmd_leave, |
5898 + room_scmd_join, room_scmd_leave, |
5900 + }, |
6096 + }, |
5901 + }; |
6097 + }; |
5902 char **paramlst; |
6098 char **paramlst; |
5903 char *subcmd; |
6099 char *subcmd; |
5904 gpointer bud; |
6100 gpointer bud; |
5905 @@ -3347,7 +4416,7 @@ |
6101 @@ -3347,7 +4547,7 @@ |
5906 cmd_room_leave(bud, arg); |
6102 cmd_room_leave(bud, arg); |
5907 } else if (!strcasecmp(subcmd, "names")) { |
6103 } else if (!strcasecmp(subcmd, "names")) { |
5908 if ((arg = check_room_subcommand(arg, FALSE, bud)) != NULL) |
6104 if ((arg = check_room_subcommand(arg, FALSE, bud)) != NULL) |
5909 - room_names(bud, arg); |
6105 - room_names(bud, arg); |
5910 + room_names(bud, room_names_style_normal); // FIXME |
6106 + room_names(bud, room_names_style_normal); // FIXME |
5911 } else if (!strcasecmp(subcmd, "nick")) { |
6107 } else if (!strcasecmp(subcmd, "nick")) { |
5912 if ((arg = check_room_subcommand(arg, FALSE, bud)) != NULL) |
6108 if ((arg = check_room_subcommand(arg, FALSE, bud)) != NULL) |
5913 room_nick(bud, arg); |
6109 room_nick(bud, arg); |
5914 @@ -4162,5 +5231,6 @@ |
6110 @@ -4162,5 +5362,6 @@ |
5915 } |
6111 } |
5916 mcabber_set_terminate_ui(); |
6112 mcabber_set_terminate_ui(); |
5917 } |
6113 } |
5918 +#endif |
6114 +#endif |
5919 |
6115 |
5920 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */ |
6116 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */ |
5921 diff -r 1b0b563a81e6 mcabber/mcabber/commands.h |
6117 diff -r 1b0b563a81e6 mcabber/mcabber/commands.h |
5922 --- a/mcabber/mcabber/commands.h Wed Mar 13 16:11:16 2013 +0200 |
6118 --- a/mcabber/mcabber/commands.h Wed Mar 13 16:11:16 2013 +0200 |
5923 +++ b/mcabber/mcabber/commands.h Sat Mar 23 03:59:57 2013 +0200 |
6119 +++ b/mcabber/mcabber/commands.h Sun Mar 24 00:58:15 2013 +0200 |
5924 @@ -5,32 +5,346 @@ |
6120 @@ -5,32 +5,362 @@ |
5925 |
6121 |
5926 #include <mcabber/config.h> |
6122 #include <mcabber/config.h> |
5927 |
6123 |
5928 -// Command structure |
6124 -// Command structure |
5929 +// |
6125 +// |
5978 +// - text message (compl: nicks in rooms, dictionary?) |
6174 +// - text message (compl: nicks in rooms, dictionary?) |
5979 +// * Non-argument checks for commands/subcommands: |
6175 +// * Non-argument checks for commands/subcommands: |
5980 +// - xmpp_is_online() |
6176 +// - xmpp_is_online() |
5981 +// - current_buddy |
6177 +// - current_buddy |
5982 +// * Usable subsystem for completion, based on user-supplied completors |
6178 +// * Usable subsystem for completion, based on user-supplied completors |
6179 +// * commands: |
|
6180 +// - say/msay/say_to/room privmsg/process_line() - sort things out, maybe write special argchecker |
|
6181 +// - buffer close now only accepts windows with jid. additional checker, that also allows current 'status' buffer? |
|
5983 +// |
6182 +// |
5984 +// XXX: |
6183 +// XXX: |
5985 +// |
6184 +// |
5986 +// * while escaped aliases should not be expanded, we should still unquote them for command search |
6185 +// * while escaped aliases should not be expanded, we should still unquote them for command search |
5987 +// * allow escaping in options? |
6186 +// * allow escaping in options? |
6120 + const cmdopts_t *cmd; // - subcommand |
6319 + const cmdopts_t *cmd; // - subcommand |
6121 + struct { // - roster jid: |
6320 + struct { // - roster jid: |
6122 + gpointer bud; // - buddy struct |
6321 + gpointer bud; // - buddy struct |
6123 + gchar *resource; // - resource (optional) |
6322 + gchar *resource; // - resource (optional) |
6124 + } rjid; // |
6323 + } rjid; // |
6324 + struct { // - filename |
|
6325 + gchar *utf8; // - in utf8 |
|
6326 + gchar *local; // - in local FS encoding |
|
6327 + } fname; // |
|
6328 + time_t time; // - date/time |
|
6125 + gpointer ptr; // - anything else |
6329 + gpointer ptr; // - anything else |
6126 + } value; // |
6330 + } value; // |
6127 +}; |
6331 +}; |
6128 + |
6332 + |
6129 +// |
6333 +// |
6229 +gchar *cmdarg_check_charset (cmdarg_value_t *arg); |
6433 +gchar *cmdarg_check_charset (cmdarg_value_t *arg); |
6230 +// checks, that string is from the given list, and returns corresponding guint value |
6434 +// checks, that string is from the given list, and returns corresponding guint value |
6231 +gchar *cmdarg_check_string2enum (cmdarg_value_t *arg); |
6435 +gchar *cmdarg_check_string2enum (cmdarg_value_t *arg); |
6232 +// checks mcabber color name syntax |
6436 +// checks mcabber color name syntax |
6233 +gchar *cmdarg_check_color (cmdarg_value_t *arg); |
6437 +gchar *cmdarg_check_color (cmdarg_value_t *arg); |
6438 +// expands filename and converts encoding |
|
6439 +gchar *cmdarg_check_filename (cmdarg_value_t *arg); |
|
6440 +// destructor, frees both names |
|
6441 +void cmdarg_free_fname (cmdarg_value_t *arg); |
|
6442 +// converts iso-8601 date to epoch |
|
6443 +gchar *cmdarg_check_date (cmdarg_value_t *arg); |
|
6234 + |
6444 + |
6235 +// ready for use standard type descriptions |
6445 +// ready for use standard type descriptions |
6236 +const cmdarg_type_t cmdarg_type_nonspace; |
6446 +const cmdarg_type_t cmdarg_type_nonspace; |
6237 +const cmdarg_type_t cmdarg_type_roster_bjid; |
6447 +const cmdarg_type_t cmdarg_type_roster_bjid; |
6238 +const cmdarg_type_t cmdarg_type_roster_resource; |
6448 +const cmdarg_type_t cmdarg_type_roster_resource; |
6241 +const cmdarg_type_t cmdarg_type_bjid; |
6451 +const cmdarg_type_t cmdarg_type_bjid; |
6242 +const cmdarg_type_t cmdarg_type_uint; |
6452 +const cmdarg_type_t cmdarg_type_uint; |
6243 +const cmdarg_type_t cmdarg_type_charset; |
6453 +const cmdarg_type_t cmdarg_type_charset; |
6244 +const cmdarg_type_t cmdarg_type_string2enum; |
6454 +const cmdarg_type_t cmdarg_type_string2enum; |
6245 +const cmdarg_type_t cmdarg_type_color; |
6455 +const cmdarg_type_t cmdarg_type_color; |
6456 +const cmdarg_type_t cmdarg_type_filename; |
|
6457 +const cmdarg_type_t cmdarg_type_date; |
|
6246 + |
6458 + |
6247 +// |
6459 +// |
6248 +// Private |
6460 +// Private |
6249 +// |
6461 +// |
6250 + |
6462 + |
6288 |
6500 |
6289 #endif /* __MCABBER_COMMANDS_H__ */ |
6501 #endif /* __MCABBER_COMMANDS_H__ */ |
6290 |
6502 |
6291 diff -r 1b0b563a81e6 mcabber/mcabber/hooks.c |
6503 diff -r 1b0b563a81e6 mcabber/mcabber/hooks.c |
6292 --- a/mcabber/mcabber/hooks.c Wed Mar 13 16:11:16 2013 +0200 |
6504 --- a/mcabber/mcabber/hooks.c Wed Mar 13 16:11:16 2013 +0200 |
6293 +++ b/mcabber/mcabber/hooks.c Sat Mar 23 03:59:57 2013 +0200 |
6505 +++ b/mcabber/mcabber/hooks.c Sun Mar 24 00:58:15 2013 +0200 |
6294 @@ -638,10 +638,9 @@ |
6506 @@ -638,10 +638,9 @@ |
6295 |
6507 |
6296 scr_LogPrint(LPRINT_LOGNORM, "Running hook-post-connect..."); |
6508 scr_LogPrint(LPRINT_LOGNORM, "Running hook-post-connect..."); |
6297 |
6509 |
6298 - cmdline = from_utf8(hook_command); |
6510 - cmdline = from_utf8(hook_command); |
6317 g_free(cmdline); |
6529 g_free(cmdline); |
6318 } |
6530 } |
6319 |
6531 |
6320 diff -r 1b0b563a81e6 mcabber/mcabber/roster.c |
6532 diff -r 1b0b563a81e6 mcabber/mcabber/roster.c |
6321 --- a/mcabber/mcabber/roster.c Wed Mar 13 16:11:16 2013 +0200 |
6533 --- a/mcabber/mcabber/roster.c Wed Mar 13 16:11:16 2013 +0200 |
6322 +++ b/mcabber/mcabber/roster.c Sat Mar 23 03:59:57 2013 +0200 |
6534 +++ b/mcabber/mcabber/roster.c Sun Mar 24 00:58:15 2013 +0200 |
6323 @@ -1586,13 +1586,14 @@ |
6535 @@ -1586,13 +1586,14 @@ |
6324 // Look for a buddy whose name or jid contains string. |
6536 // Look for a buddy whose name or jid contains string. |
6325 // Search begins at current_buddy; if no match is found in the the buddylist, |
6537 // Search begins at current_buddy; if no match is found in the the buddylist, |
6326 // return NULL; |
6538 // return NULL; |
6327 +// Note: before this function considered its argument to be in local encoding, |
6539 +// Note: before this function considered its argument to be in local encoding, |
6358 if (found) |
6570 if (found) |
6359 return buddy; |
6571 return buddy; |
6360 } |
6572 } |
6361 diff -r 1b0b563a81e6 mcabber/mcabber/screen.c |
6573 diff -r 1b0b563a81e6 mcabber/mcabber/screen.c |
6362 --- a/mcabber/mcabber/screen.c Wed Mar 13 16:11:16 2013 +0200 |
6574 --- a/mcabber/mcabber/screen.c Wed Mar 13 16:11:16 2013 +0200 |
6363 +++ b/mcabber/mcabber/screen.c Sat Mar 23 03:59:57 2013 +0200 |
6575 +++ b/mcabber/mcabber/screen.c Sun Mar 24 00:58:15 2013 +0200 |
6364 @@ -3630,7 +3630,7 @@ |
6576 @@ -3630,7 +3630,7 @@ |
6365 { |
6577 { |
6366 scr_check_auto_away(TRUE); |
6578 scr_check_auto_away(TRUE); |
6367 last_activity_buddy = current_buddy; |
6579 last_activity_buddy = current_buddy; |
6368 - if (process_line(inputLine)) |
6580 - if (process_line(inputLine)) |
6428 g_free(cmdline); |
6640 g_free(cmdline); |
6429 return 0; |
6641 return 0; |
6430 } |
6642 } |
6431 diff -r 1b0b563a81e6 mcabber/mcabber/settings.c |
6643 diff -r 1b0b563a81e6 mcabber/mcabber/settings.c |
6432 --- a/mcabber/mcabber/settings.c Wed Mar 13 16:11:16 2013 +0200 |
6644 --- a/mcabber/mcabber/settings.c Wed Mar 13 16:11:16 2013 +0200 |
6433 +++ b/mcabber/mcabber/settings.c Sat Mar 23 03:59:57 2013 +0200 |
6645 +++ b/mcabber/mcabber/settings.c Sun Mar 24 00:58:15 2013 +0200 |
6434 @@ -183,28 +183,12 @@ |
6646 @@ -183,28 +183,12 @@ |
6435 if ((*line == '\n') || (*line == '\0') || (*line == '#')) |
6647 if ((*line == '\n') || (*line == '\0') || (*line == '#')) |
6436 continue; |
6648 continue; |
6437 |
6649 |
6438 - // If we aren't in runtime (i.e. startup) we'll only accept "safe" commands |
6650 - // If we aren't in runtime (i.e. startup) we'll only accept "safe" commands |
6465 } |
6677 } |
6466 g_free(buf); |
6678 g_free(buf); |
6467 fclose(fp); |
6679 fclose(fp); |
6468 diff -r 1b0b563a81e6 mcabber/mcabber/xmpp_iq.c |
6680 diff -r 1b0b563a81e6 mcabber/mcabber/xmpp_iq.c |
6469 --- a/mcabber/mcabber/xmpp_iq.c Wed Mar 13 16:11:16 2013 +0200 |
6681 --- a/mcabber/mcabber/xmpp_iq.c Wed Mar 13 16:11:16 2013 +0200 |
6470 +++ b/mcabber/mcabber/xmpp_iq.c Sat Mar 23 03:59:57 2013 +0200 |
6682 +++ b/mcabber/mcabber/xmpp_iq.c Sun Mar 24 00:58:15 2013 +0200 |
6471 @@ -71,20 +71,20 @@ |
6683 @@ -71,20 +71,20 @@ |
6472 struct adhoc_status { |
6684 struct adhoc_status { |
6473 char *name; // the name used by adhoc |
6685 char *name; // the name used by adhoc |
6474 char *description; |
6686 char *description; |
6475 - char *status; // the string, used by setstus |
6687 - char *status; // the string, used by setstus |
6514 lm_message_node_set_attribute(command, "status", "completed"); |
6726 lm_message_node_set_attribute(command, "status", "completed"); |
6515 lm_message_node_add_dataform_result(command, |
6727 lm_message_node_add_dataform_result(command, |
6516 "Status has been changed"); |
6728 "Status has been changed"); |
6517 diff -r 1b0b563a81e6 mcabber/modules/beep/beep.c |
6729 diff -r 1b0b563a81e6 mcabber/modules/beep/beep.c |
6518 --- a/mcabber/modules/beep/beep.c Wed Mar 13 16:11:16 2013 +0200 |
6730 --- a/mcabber/modules/beep/beep.c Wed Mar 13 16:11:16 2013 +0200 |
6519 +++ b/mcabber/modules/beep/beep.c Sat Mar 23 03:59:57 2013 +0200 |
6731 +++ b/mcabber/modules/beep/beep.c Sun Mar 24 00:58:15 2013 +0200 |
6520 @@ -31,6 +31,7 @@ |
6732 @@ -31,6 +31,7 @@ |
6521 |
6733 |
6522 static void beep_init (void); |
6734 static void beep_init (void); |
6523 static void beep_uninit (void); |
6735 static void beep_uninit (void); |
6524 +static gchar *do_beep (const cmdopts_t *command, cmdarg_value_t *values); |
6736 +static gchar *do_beep (const cmdopts_t *command, cmdarg_value_t *values); |