aMSN Forums
August 15, 2020, 08:36:32 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2
1  The Community / Plugins / [request plugin] Imitate command of MSN Discovery on: February 04, 2008, 10:31:31 pm
Hi,
the plugin seems don't work because at fakingit.tcl the function
Code:
::MSN::changeName [::config::getKey login] $friend_nick
seems don't have effect.
At MessageSend (gui.tcl) in
Code:
::MSN::messageTo $chatid "$msgchunk" $ackid $friendlyname
the friendlyname is empty. For "impersonate" the friendlyname must be the nickname of user in chat.
Can add in gui.tcl a
Code:
set evPar(friendlyname) friendlyname
before
Code:
::plugins::PostEvent chat_msg_send evPar
so from plugin we can modify this parameter?

I don't know how amsn code works so, is there another method for that?
2  The Community / Feedback and Suggestions / Little question [base64 from tcl to C] on: February 02, 2008, 07:01:21 pm
Maybe it's a stupid question but..
Why don't translate the code of base64 from tcl to C ( and use a library like libtray etc.. )?
I tested the code for 70000 iteration ( ok, this is exaggerated, but it's only for test the speed of algorithm ):
Code:

#include <ctype.h>
#include <tcl.h>

 static const char base64digits[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

 #define BAD     -1
 static const char base64val[] = {
     BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD,
     BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD,
     BAD,BAD,BAD,BAD, BAD,BAD,BAD,BAD, BAD,BAD,BAD, 62, BAD,BAD,BAD, 63,
      52, 53, 54, 55,  56, 57, 58, 59,  60, 61,BAD,BAD, BAD,BAD,BAD,BAD,
     BAD,  0,  1,  2,   3,  4,  5,  6,   7,  8,  9, 10,  11, 12, 13, 14,
      15, 16, 17, 18,  19, 20, 21, 22,  23, 24, 25,BAD, BAD,BAD,BAD,BAD,
     BAD, 26, 27, 28,  29, 30, 31, 32,  33, 34, 35, 36,  37, 38, 39, 40,
      41, 42, 43, 44,  45, 46, 47, 48,  49, 50, 51,BAD, BAD,BAD,BAD,BAD
 };
 #define DECODE64(c)  (isascii(c) ? base64val[c] : BAD)

 void to64frombits(unsigned char *out, const unsigned char *in, int inlen)
 {
         for (; inlen >= 3; inlen -= 3)
         {
                 *out++ = base64digits[in[0] >> 2];
                 *out++ = base64digits[((in[0] << 4) & 0x30) | (in[1] >> 4)];
                 *out++ = base64digits[((in[1] << 2) & 0x3c) | (in[2] >> 6)];
                 *out++ = base64digits[in[2] & 0x3f];
                 in += 3;
         }

         if (inlen > 0)
         {
                 unsigned char fragment;

                 *out++ = base64digits[in[0] >> 2];
                 fragment = (in[0] << 4) & 0x30;

                 if (inlen > 1)
                         fragment |= in[1] >> 4;

                 *out++ = base64digits[fragment];
                 *out++ = (inlen < 2) ? '=' : base64digits[(in[1] << 2) & 0x3c];
                 *out++ = '=';
         }

         *out = '\0';
 }

 int from64tobits(char *out, const char *in)
 {
         int len = 0;
         register unsigned char digit1, digit2, digit3, digit4;

         if (in[0] == '+' && in[1] == ' ')
                 in += 2;
         if (*in == '\r')
                 return(0);

         do {
                 digit1 = in[0];
                 if (DECODE64(digit1) == BAD)
                         return(-1);
                 digit2 = in[1];
                 if (DECODE64(digit2) == BAD)
                         return(-1);
                 digit3 = in[2];
                 if (digit3 != '=' && DECODE64(digit3) == BAD)
                         return(-1);
                 digit4 = in[3];
                 if (digit4 != '=' && DECODE64(digit4) == BAD)
                         return(-1);
                 in += 4;
                 *out++ = (DECODE64(digit1) << 2) | (DECODE64(digit2) >> 4);
                 ++len;
                 if (digit3 != '=')
                 {
                         *out++ = ((DECODE64(digit2) << 4) & 0xf0) | (DECODE64(digit3) >> 2);
                         ++len;
                         if (digit4 != '=')
                         {
                                 *out++ = ((DECODE64(digit3) << 6) & 0xc0) | DECODE64(digit4);
                                 ++len;
                         }
                 }
         } while (*in && *in != '\r' && digit4 != '=');

         return (len);
 }

static int Base64_Cmd(ClientData cdata, Tcl_Interp *interp, int objc,  Tcl_Obj * CONST objv[])
 {
         char out[4];
         to64frombits(out,"test",4);
         Tcl_SetObjResult(interp, Tcl_NewStringObj(out, -1));
         return TCL_OK;
 }

 int Base_Init(Tcl_Interp *interp)
 {
         if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
                 return TCL_ERROR;
         }
         /* changed this to check for an error - GPS */
         if (Tcl_PkgProvide(interp, "Base64", "1.0") == TCL_ERROR) {
                 return TCL_ERROR;
         }
         Tcl_CreateObjCommand(interp, "base64test", Base64_Cmd, NULL, NULL);
         return TCL_OK;
 }


Code:

set auto_path base64
package require base64
for {set x 0} {$x<70000} {incr x} {
::base64::encode test
}
exit


Code:

load ./libbase64.so
for {set x 0} {$x<70000} {incr x} {
base64test
}
exit


Code:

shadow@sifpc ~/workspace/tcl_C $ time wish base64.tcl

real    0m1.209s
user    0m1.190s
sys     0m0.012s
shadow@sifpc ~/workspace/tcl_C $ time wish test.tcl

real    0m0.168s
user    0m0.161s
sys     0m0.004s


And maybe we could translate others like sha1,uuencode,yencode ?!
3  The Community / Feedback and Suggestions / amsn systray on kde4 on: February 01, 2008, 01:52:18 pm
Quote from: "kakaroto"
maybe kde 3.x supports both methods but 4.x supports only the 'standard' method...

I read from http://websvn.kde.org/trunk/KDE/kdebase/workspace/kwin/COMPLIANCE?view=markup that the specific method is implemented also in kde 4.x
Quote from: "kakaroto"
final solution would be to use both methods (move the send_message SYSTEM_TRAY_REQUEST_DOCK outside the 'else', but I don't know if that would affect some versions of kde (trying to dock twice might make it crash or whatever...)

In kde 3.x ( 3.5.7-8 ) work fine, but in kde 4.x ( svn version ) there are twice dock, one in tray system and another over the desktop ( only border without icon ).
4  The Community / Feedback and Suggestions / amsn systray on kde4 on: February 01, 2008, 11:53:25 am
So.. i don't understand if is a problem of amsn or kde...
_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR seems don't work fine.
5  The Community / Feedback and Suggestions / amsn systray on kde4 on: January 30, 2008, 11:36:10 am
Hi, i have just switched to KDE4 .. for the moment i have found a temporaly patch for trayicon ( work for me in kde4 and kde3):

shadow@sifpc /home/kde-devel/amsn/utils/linux/traydock $ diff -u libtray.orig.c libtray.c

Code:

--- libtray.orig.c      2008-01-30 11:15:48.000000000 +0100
+++ libtray.c   2008-01-30 11:17:09.000000000 +0100
@@ -178,17 +178,17 @@

        Tk_UnmapWindow(icon->win);

-       if (wm_name != NULL && !strcmp(wm_name, "KWin")) {
+       /*if (wm_name != NULL && !strcmp(wm_name, "KWin")) {

                atom = XInternAtom(display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False);

                ret = XChangeProperty(display, parent, atom,
                                XA_WINDOW, 32, PropModeReplace, (unsigned char *)&parent, 1);
                Tk_MapWindow(icon->win);
-       } else {
+       } else {*/
                send_message(display,systemtray,XInternAtom (display, "_NET_SYSTEM_TRAY_OPCODE", False ),
                                SYSTEM_TRAY_REQUEST_DOCK,Tk_WindowId(icon->win),0,0);
-       }
+       //}

        XFree(wm_name);



Is there a method ( atom ) for retrive version of KWIN ?
6  aMSN Support / Linux / [SOLVED]strange problem on: May 26, 2007, 04:21:19 pm
Quote from: "Fenix-TX"
I'm using KDE 3.5.7 i don't know if this happened when i upgraded to latest amsn or latest kde because i had upgraded both at same time..

EDITED: I've uploaded a video. It's not good, but you can see this issue and again the double click contact issue on contact list:

http://webs.ono.com/jesusvpct/amsn_issues.ogg



I think this is not a WM bug.. i use KDE 3.5.6 :?

Edit: I download the latest svn 8766 and seems return to work..
7  aMSN Support / Linux / [SOLVED]strange problem on: May 26, 2007, 11:42:23 am
Yes, i confirm too.
I use kde with tcl/tk 8.5a6
8  Development / Amsn development related issues / How implement 2 functions for latex plugin on: May 21, 2007, 09:27:09 am
Hello guys,   

I am trying to create a plugin based on TeXIM and compatible with pidgin latex plugin (I have more contacts that use pigdin) :
http://tapas.affenbande.org/wordpress/?page_id=70

my idea is :
1)register a event for chat_msg_receive
2) split del text receive and search for "$$expr$$" strings
3) substitute the strings with images ( createde before with the metod Create_GIF_from_Tex of TeXIM )
4) write in the chat window with one metod ( WinWrite ?? )

I know very little of tcl/tk.. i know how implement the point 1 and 2.. but for point 3 and 4 ? Tongue

Tnx in advance
Bye Smiley
9  The Community / Feedback and Suggestions / my suggestion for login gui on: May 08, 2007, 05:34:11 pm
I have create this ( ugly.. :lol: ) mock-up to expose my idea:



I think this is a more clean and ordered
Even near the options can be put icons ( like now language and check version )

PS: i have also thinked that the user's picture can be stay always ( this is not in mock-up)
Smiley bye
10  The Community / Skins / Move all skins to the svn and Emerald as new defult skin on: April 09, 2007, 04:00:20 pm
Quote from: "Bloodsucker"
i DON'T LIKE the new background theme: http://img243.imageshack.us/img243/8159/pompompombf5.jpg is very... horrible. I prefer the lasted (the background with two "msn persons" Wink)

plis, see it


Yes, is true Tongue ..
11  The Community / Plugins / SpyUser on: March 31, 2007, 09:55:55 pm
;-) re-nice plugin ..
[For Italian people] a quanto ho capito sei italiano per cui ti scrivo in lingua madre Tongue.. C'è un problema di codifica nel carattere "ò" del file langit (quello nella prima riga).. non lo visualizzo correttamente. Penso sia dovuto al fatto che hai formattato il file con UTF-8 mentre nei file di lingua utilizzano ISO-8859-1   ... ancora complimenti Wink [/For Italian people]
12  aMSN Support / General / What does this icon mean? on: March 31, 2007, 12:37:14 am
you are not present in their contact's list.. i believe
13  The Community / Plugins / ColoredNicks plugin on: March 30, 2007, 12:30:18 pm
Hey Smiley .. nice plugin
So, I have read quickly the code of plugin , if i can give a suggestion to you:
at 766 line:
Code:

proc getColor { num } {
if { $num < 23 } {
if {[string equal $num "00"]} {return "FFFFFF"}
if {[string equal $num "01"]} {return "000000"}
if {[string equal $num "02"]} {return "00007F"}
if {[string equal $num "03"]} {return "009300"}
if {[string equal $num "04"]} {return "FF0000"}
if {[string equal $num "05"]} {return "7F0000"}
if {[string equal $num "06"]} {return "9C009C"}
if {[string equal $num "07"]} {return "FC7F00"}
if {[string equal $num "08"]} {return "FFFF00"}
if {[string equal $num "09"]} {return "00FC00"}
if {[string equal $num "10"]} {return "009393"}
if {[string equal $num "11"]} {return "00FFFF"}
if {[string equal $num "12"]} {return "2020FC"}
if {[string equal $num "13"]} {return "FF00FF"}
if {[string equal $num "14"]} {return "7F7F7F"}
if {[string equal $num "15"]} {return "D2D2D2"}
if {[string equal $num "16"]} {return "E7E6E4"}
if {[string equal $num "17"]} {return "CFCDD0"}
if {[string equal $num "18"]} {return "FFDEA4"}
if {[string equal $num "19"]} {return "FFAEB9"}
if {[string equal $num "20"]} {return "FFA8FF"}
if {[string equal $num "21"]} {return "B4B4FC"}
if {[string equal $num "22"]} {return "BAFBE5"}
..........


I think that you can have more efficent and clean code creating one array of string with all colours and returning array_colors[num]
I don't know the tcl/tk for that i can't translate my suggestion in the code Tongue
14  The Community / Plugins / Winks pluggin, a little work on: March 25, 2007, 10:40:47 am
This one is ok Smiley
the missing key of italian translation :
Code:
winks_file_is_not_a_wink Il file non contiene animoticon.


Bye
15  The Community / Plugins / Winks pluggin, a little work on: March 21, 2007, 10:33:22 am
At last SVN version:
Code:

Revisione corrente: 8265
U    amsn/plugins/winks/lang/langit
U    amsn/plugins/winks/plugininfo.xml
U    amsn/plugins/winks/winks.tcl
Aggiornato alla revisione 8266.
------------------------------------------------------------------------
r8266 | kakaroto | 2007-03-21 04:48:30 +0100 (mer, 21 mar 2007) | 6 lines


when i try to load winks plugin:

Code:
Winks: Failed to load source with result:
missing close-brace
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!