This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

my eggdrop can not join in channel with ascii codes :(

General support and discussion of Eggdrop bots.
S
Syem
Voice
Posts: 14
Joined: Sat Jul 05, 2008 9:20 pm

Post by Syem »

thx man, its work :D. Thanx so much.
S
Syem
Voice
Posts: 14
Joined: Sat Jul 05, 2008 9:20 pm

Post by Syem »

Eggdrop join to #ʞɔƞɟ.əɥʇ.ʇɐɥʍ after install this patch with command you said to me. And its work fine momentarily... Thanx.
S
Syem
Voice
Posts: 14
Joined: Sat Jul 05, 2008 9:20 pm

Post by Syem »

But what is this error ? :

Code: Select all

patch -p1 <eggdr.patch
patching file src/main.h
patching file src/tcl.c
Hunk #1 FAILED at 650.
1 out of 1 hunk FAILED -- saving rejects to file src/tcl.c.rej
1 out of 1 hunk FAILED -- saving rejects to file src/tcl.c.rej ?

I open file tcl.c.rej and in this file is :

Code: Select all

***************
*** 650,656 ****
    if (encoding == NULL) {
      encoding = "iso8859-1";
    }
-
    Tcl_SetSystemEncoding(NULL, encoding);


--- 650,656 ----
    if (encoding == NULL) {
      encoding = "iso8859-1";
    }
+   encoding = "utf-8";
    Tcl_SetSystemEncoding(NULL, encoding);
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

It basically means patch was unable to make that change (remove an empty line near line 650, and add "encoding = "utf-8";" to the very same line).
NML_375
S
Syem
Voice
Posts: 14
Joined: Sat Jul 05, 2008 9:20 pm

Post by Syem »

Hmm, i dont exactly where put code "encoding = "utf-8";" :(
S
Syem
Voice
Posts: 14
Joined: Sat Jul 05, 2008 9:20 pm

Post by Syem »

mda :( ... wen bot give restart or rehash... part from #ʞɔƞɟ.əɥʇ.ʇɐɥʍ and join to a stupid channel ex: #ʞɔƞɟ.əɥʇ.ʇɐɥʍ or #ʞɔƞɟ.əɥʇ.ʇɐÉÃ
or #ʞɔƞɟ.ÉÂÂ

etc...

:( . what is wrong to him ?
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

The Utf-8 in that other forum post isn't complete, it doesn't yet enable eggdrop to join (or rather.. it can't save those channels properly to the chanfile and restore later) utf8 chans.
The fix (on top of the other one) to fix that issue is:
(that means you need both)

Code: Select all

diff -urN eggdrop1.6.19.original/src/chanprog.c eggdrop1.6.19.modified/src/chanprog.c
--- eggdrop1.6.19.original/src/chanprog.c       2008-02-16 22:41:03.000000000 +0100
+++ eggdrop1.6.19.modified/src/chanprog.c       2010-06-21 14:24:27.000000000 +0200
@@ -444,7 +444,7 @@
   protect_readonly = 0;
 
   /* Now read it */
-  if (!readtclprog(configfile))
+  if (!readtclprog(configfile, 0))
     fatal(MISC_NOCONFIGFILE, 0);
 
   for (i = 0; i < max_logs; i++) {
diff -urN eggdrop1.6.19.original/src/mod/channels.mod/channels.c eggdrop1.6.19.modified/src/mod/channels.mod/channels.c
--- eggdrop1.6.19.original/src/mod/channels.mod/channels.c      2008-02-16 22:41:06.000000000 +0100
+++ eggdrop1.6.19.modified/src/mod/channels.mod/channels.c      2010-06-21 14:24:27.000000000 +0200
@@ -498,7 +498,7 @@
     if (!channel_static(chan))
       chan->status |= CHAN_FLAGGED;
   chan_hack = 1;
-  if (!readtclprog(chanfile) && create) {
+  if (!readtclprog(chanfile, 1) && create) {
     FILE *f;
 
     /* Assume file isnt there & therfore make it */
diff -urN eggdrop1.6.19.original/src/mod/module.h eggdrop1.6.19.modified/src/mod/module.h
--- eggdrop1.6.19.original/src/mod/module.h     2008-02-16 22:41:06.000000000 +0100
+++ eggdrop1.6.19.modified/src/mod/module.h     2010-06-21 14:29:54.000000000 +0200
@@ -282,7 +282,7 @@
 #define copyfile ((int (*) (char *, char *))global[147])
 /* 148 - 151 */
 #define do_tcl ((void (*)(char *, char *))global[148])
-#define readtclprog ((int (*)(const char *))global[149])
+#define readtclprog ((int (*)(const char *, int))global[149])
 #define get_language ((char *(*)(int))global[150])
 #define def_get ((void *(*)(struct userrec *, struct user_entry *))global[151])
 /* 152 - 155 */
diff -urN eggdrop1.6.19.original/src/proto.h eggdrop1.6.19.modified/src/proto.h
--- eggdrop1.6.19.original/src/proto.h  2008-02-16 22:41:04.000000000 +0100
+++ eggdrop1.6.19.modified/src/proto.h  2010-06-21 14:30:06.000000000 +0200
@@ -270,7 +270,7 @@
 void protect_tcl();
 void unprotect_tcl();
 void do_tcl(char *, char *);
-int readtclprog(char *fname);
+int readtclprog(char *fname, int);
 
 /* userent.c */
 void list_type_kill(struct list_type *);
diff -urN eggdrop1.6.19.original/src/tcl.c eggdrop1.6.19.modified/src/tcl.c
--- eggdrop1.6.19.original/src/tcl.c    2008-02-16 22:41:04.000000000 +0100
+++ eggdrop1.6.19.modified/src/tcl.c    2010-06-21 14:26:57.000000000 +0200
@@ -725,21 +725,34 @@
  *
  * returns:   1 - if everything was okay
  */
-int readtclprog(char *fname)
+int readtclprog(char *fname, int noencoding)
 {
   int code;
   char *result;
 #ifdef USE_TCL_ENCODING
+  char *encoding = NULL;
   Tcl_DString dstr;
 #endif
 
   if (!file_readable(fname))
     return 0;
 
+#ifdef USE_TCL_ENCODING
+  if (noencoding && Tcl_Eval(interp, "encoding system") == TCL_OK) {
+    encoding = nmalloc(strlen(interp->result)+1);
+    strcpy(encoding, interp->result);
+    Tcl_SetSystemEncoding(interp, "identity");
+  }
+#endif
+
   code = Tcl_EvalFile(interp, fname);
   result = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
 
 #ifdef USE_TCL_ENCODING
+  if (noencoding && encoding) {
+    Tcl_SetSystemEncoding(interp, encoding);
+    nfree(encoding);
+  }
   /* properly convert string to system encoding. */
   Tcl_DStringInit(&dstr);
   Tcl_UtfToExternalDString(NULL, result, -1, &dstr);
It's a "-p1" patch.

PS: Sorry, I didn't pay attention to the date, replying to a 2 year old post is a bit futile :)
Post Reply