egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

my eggdrop can not join in channel with ascii codes :(
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
Syem
Voice


Joined: 05 Jul 2008
Posts: 14

PostPosted: Tue Jul 15, 2008 6:45 pm    Post subject: Reply with quote

thx man, its work Very Happy. Thanx so much.
Back to top
View user's profile Send private message
Syem
Voice


Joined: 05 Jul 2008
Posts: 14

PostPosted: Tue Jul 15, 2008 6:49 pm    Post subject: Reply with quote

Eggdrop join to #ʞɔƞɟ.əɥʇ.ʇɐɥʍ after install this patch with command you said to me. And its work fine momentarily... Thanx.
Back to top
View user's profile Send private message
Syem
Voice


Joined: 05 Jul 2008
Posts: 14

PostPosted: Tue Jul 15, 2008 7:00 pm    Post subject: Reply with quote

But what is this error ? :
Code:
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:

***************
*** 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);
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2835

PostPosted: Tue Jul 15, 2008 7:03 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Syem
Voice


Joined: 05 Jul 2008
Posts: 14

PostPosted: Tue Jul 15, 2008 7:14 pm    Post subject: Reply with quote

Hmm, i dont exactly where put code "encoding = "utf-8";" Sad
Back to top
View user's profile Send private message
Syem
Voice


Joined: 05 Jul 2008
Posts: 14

PostPosted: Wed Jul 16, 2008 6:17 pm    Post subject: Reply with quote

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

etc...

Sad . what is wrong to him ?
Back to top
View user's profile Send private message
thommey
Halfop


Joined: 01 Apr 2008
Posts: 73

PostPosted: Mon Jun 21, 2010 8:40 am    Post subject: Reply with quote

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:

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 Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber