Discussion:
[ekg-commit] r2842 - in trunk: . docs src
EKG commit list
2010-03-02 11:52:33 UTC
Permalink
Author: gophi
Date: 2010-03-02 12:52:32 +0100 (Tue, 02 Mar 2010)
New Revision: 2842

Modified:
trunk/ChangeLog
trunk/docs/FAQ
trunk/src/ekg.c
trunk/src/stuff.c
trunk/src/stuff.h
Log:
- specjalne traktowanie aliasu /autorun (joshua/g)



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-02-02 22:22:09 UTC (rev 2841)
+++ trunk/ChangeLog 2010-03-02 11:52:32 UTC (rev 2842)
@@ -4,6 +4,10 @@
to kto? oznaczony przez ,,x'' (w - wojtekka, s - speedy, a - arekm,
d - drg, sz - szalik, del - deletek, g - gophi, p - porridge).

+// 2010-03-02
+
+- specjalne traktowanie aliasu /autorun (joshua/g)
+
// 2010-02-02

- wy?wietlanie dnd i ffc na li?cie kontakt?w (Kosma/g)

Modified: trunk/docs/FAQ
===================================================================
--- trunk/docs/FAQ 2010-02-02 22:22:09 UTC (rev 2841)
+++ trunk/docs/FAQ 2010-03-02 11:52:32 UTC (rev 2842)
@@ -133,4 +133,10 @@
Co zrobi??
A: ,,/set contacts_options order=5016234''.

+Q: Czy jest mo?liwo?? ?eby okre?lone polecenia by?y wykonywane po starcie programu?
+A: Tak, s?u?y do tego alias ,,autorun''.
+
+Q: Zepsu?em, alias ,,autorun'' uniemo?liwia korzystanie z programu!
+A: U?yj opcji -A i usu? ten alias.
+
$Id$

Modified: trunk/src/ekg.c
===================================================================
--- trunk/src/ekg.c 2010-02-02 22:22:09 UTC (rev 2841)
+++ trunk/src/ekg.c 2010-03-02 11:52:32 UTC (rev 2842)
@@ -1155,6 +1155,7 @@
{ "user", required_argument, 0, 'u' },
{ "version", no_argument, 0, 'v' },
{ "no-global-config", no_argument, 0, 'N' },
+ { "no-autorun", no_argument, 0, 'A' },
{ 0, 0, 0, 0 }
};

@@ -1220,7 +1221,7 @@
sa.sa_handler = handle_sigusr2;
sigaction(SIGUSR2, &sa, NULL);

- while ((c = getopt_long(argc, argv, "b::a::i::F::d::pnc:f:hI:ot:u:vN", ekg_options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "b::a::i::F::d::pnc:f:hI:ot:u:vNA", ekg_options, NULL)) != -1) {
switch (c) {
case 'b':
if (!optarg && argv[optind] && argv[optind][0] != '-')
@@ -1275,6 +1276,7 @@
printf(""
"u?ycie: %s [OPCJE] [KOMENDY]\n"
" -N, --no-global-config ignoruje globalny plik konfiguracyjny\n"
+" -A, --no-autorun nie uruchamia aliasu ,,autorun'' przy starcie\n"
" -u, --user=NAZWA korzysta z profilu u?ytkownika o podanej nazwie\n"
" -t, --theme=PLIK ?aduje opis wygl?du z podanego pliku\n"
" -c, --control-pipe=PLIK potok nazwany sterowania\n"
@@ -1320,10 +1322,13 @@
case 'v':
printf("ekg-%s\nlibgadu-%s (headers %s, protocol 0x%.2x, client \"%s\")\ncompile time: %s\n", VERSION, gg_libgadu_version(), GG_LIBGADU_VERSION, GG_DEFAULT_PROTOCOL_VERSION, GG_DEFAULT_CLIENT_VERSION, compile_time());
return 0;
+ case 'A':
+ no_autorun = 1;
+ break;
#ifdef WITH_IOCTLD
case 'I':
ioctld_path = optarg;
- break;
+ break;
#endif
case 'f':
ui_set = 1;
@@ -1648,6 +1653,19 @@
python_autorun();
#endif

+ if (!no_autorun) {
+ list_t l;
+
+ for (l = aliases; l; l = l->next) {
+ struct alias *a = l->data;
+
+ if (!strcasecmp("autorun", a->name)) {
+ command_exec(NULL, "/autorun", 0);
+ break;
+ }
+ }
+ }
+
if (config_uin && config_password && auto_connect) {
print("connecting");
connecting = 1;

Modified: trunk/src/stuff.c
===================================================================
--- trunk/src/stuff.c 2010-02-02 22:22:09 UTC (rev 2841)
+++ trunk/src/stuff.c 2010-03-02 11:52:32 UTC (rev 2842)
@@ -96,6 +96,7 @@

int command_processing = 0;
int in_autoexec = 0;
+int no_autorun = 0;
int in_auto_away = 0;
int config_auto_reconnect = 10;
int reconnect_timer = 0;

Modified: trunk/src/stuff.h
===================================================================
--- trunk/src/stuff.h 2010-02-02 22:22:09 UTC (rev 2841)
+++ trunk/src/stuff.h 2010-03-02 11:52:32 UTC (rev 2842)
@@ -363,6 +363,7 @@
char *config_dir;
int command_processing;
int in_autoexec;
+int no_autorun;
int reconnect_timer;
time_t last_action;
int connecting;

Loading...