[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Mon Nov 8 04:02:45 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Branch tags: gettext
Commit time: 2010-11-08 10:02:43 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
  Tag: gettext
     doc/Changes1.8 src/bg.c src/mem.c src/modules.c src/net.c
     src/patch.h src/tcl.c src/tclhash.c src/tls.c src/userrec.c
     src/users.c

Log message:

Replaced language #defines with english strings from core.english.lang, marked for translation.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.36.2.1 eggdrop1.8/doc/Changes1.8:1.36.2.2
--- eggdrop1.8/doc/Changes1.8:1.36.2.1	Sat Nov  6 14:57:41 2010
+++ eggdrop1.8/doc/Changes1.8	Mon Nov  8 04:02:28 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.36.2.1 2010/11/06 20:57:41 pseudo Exp $
+$Id: Changes1.8,v 1.36.2.2 2010/11/08 10:02:28 pseudo Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,10 @@
 
 1.8.0 (CVS):
 
+  - Replaced first part of language #defines with english strings from
+    core.english.lang, marked for translation.
+    Patch by: pseudo
+
   - Added dummy gettext macros to prepare for the transition to gettext.
     Patch by: pseudo
 
Index: eggdrop1.8/src/bg.c
diff -u eggdrop1.8/src/bg.c:1.1.1.1 eggdrop1.8/src/bg.c:1.1.1.1.2.1
--- eggdrop1.8/src/bg.c:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/bg.c	Mon Nov  8 04:02:29 2010
@@ -3,7 +3,7 @@
  *   moving the process to the background, i.e. forking, while keeping threads
  *   happy.
  *
- * $Id: bg.c,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+ * $Id: bg.c,v 1.1.1.1.2.1 2010/11/08 10:02:29 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -110,16 +110,16 @@
     fprintf(fp, "%u\n", p);
     if (fflush(fp)) {
       /* Kill bot incase a botchk is run from crond. */
-      printf(EGG_NOWRITE, pid_file);
-      printf("  Try freeing some disk space\n");
+      printf(_("* Warning! Could not write %s file!\n"), pid_file);
+      printf(_("  Try freeing some disk space\n"));
       fclose(fp);
       unlink(pid_file);
       exit(1);
     }
     fclose(fp);
   } else
-    printf(EGG_NOWRITE, pid_file);
-  printf("Launched into the background  (pid: %d)\n\n", p);
+    printf(_("* Warning! Could not write %s file!\n"), pid_file);
+  printf(_("Launched into the background  (pid: %d)\n\n"), p);
 #ifdef HAVE_SETPGID
   setpgid(p, p);
 #endif
@@ -140,7 +140,7 @@
     int comm_pair[2];
 
     if (pipe(comm_pair) < 0)
-      fatal("CANNOT OPEN PIPE.", 0);
+      fatal(_("CANNOT OPEN PIPE."), 0);
 
     bg.comm_recv = comm_pair[0];
     bg.comm_send = comm_pair[1];
@@ -148,7 +148,7 @@
 
   p = fork();
   if (p == -1)
-    fatal("CANNOT FORK PROCESS.", 0);
+    fatal(_("CANNOT FORK PROCESS."), 0);
   if (p == 0) {
     bg.state = BG_SPLIT;
     return;
@@ -181,7 +181,7 @@
 error:
   /* We only reach this point in case of an error.
    */
-  fatal("COMMUNICATION THROUGH PIPE BROKE.", 0);
+  fatal(_("COMMUNICATION THROUGH PIPE BROKE."), 0);
 }
 
 /* Transfer contents of pid_file to parent process. This is necessary,
@@ -203,7 +203,7 @@
     goto error;
   return;
 error:
-  fatal("COMMUNICATION THROUGH PIPE BROKE.", 0);
+  fatal(_("COMMUNICATION THROUGH PIPE BROKE."), 0);
 }
 
 void bg_send_quit(bg_quit_t q)
@@ -223,7 +223,7 @@
       message.comm_type = BG_COMM_ABORT;
     /* Send message. */
     if (write(bg.comm_send, &message, sizeof(message)) < 0)
-      fatal("COMMUNICATION THROUGH PIPE BROKE.", 0);
+      fatal(_("COMMUNICATION THROUGH PIPE BROKE."), 0);
   }
 }
 
@@ -238,8 +238,9 @@
     int xx = fork();
 
     if (xx == -1)
-      fatal("CANNOT FORK PROCESS.", 0);
+      fatal(_("CANNOT FORK PROCESS."), 0);
     if (xx != 0)
       bg_do_detach(xx);
   }
 }
+
Index: eggdrop1.8/src/mem.c
diff -u eggdrop1.8/src/mem.c:1.2 eggdrop1.8/src/mem.c:1.2.2.1
--- eggdrop1.8/src/mem.c:1.2	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mem.c	Mon Nov  8 04:02:30 2010
@@ -3,7 +3,7 @@
  *   memory allocation and deallocation
  *   keeping track of what memory is being used by whom
  *
- * $Id: mem.c,v 1.2 2010/10/19 12:13:33 pseudo Exp $
+ * $Id: mem.c,v 1.2.2.1 2010/11/08 10:02:30 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -90,10 +90,10 @@
   float per;
 
   per = ((lastused * 1.0) / (MEMTBLSIZE * 1.0)) * 100.0;
-  dprintf(DP_HELP, "NOTICE %s :Memory table usage: %d/%d (%.1f%% full)\n",
+  dprintf(DP_HELP, _("NOTICE %s :Memory table usage: %d/%d (%.1f%% full)\n"),
           nick, lastused, MEMTBLSIZE, per);
 #endif
-  dprintf(DP_HELP, "NOTICE %s :Think I'm using about %dk.\n", nick,
+  dprintf(DP_HELP, _("NOTICE %s :Think I'm using about %dk.\n"), nick,
           (int) (expected_memory() / 1024));
 }
 
@@ -105,13 +105,13 @@
 
   exp = expected_memory();      /* in main.c ? */
   per = ((lastused * 1.0) / (MEMTBLSIZE * 1.0)) * 100.0;
-  dprintf(idx, "Memory table: %d/%d (%.1f%% full)\n", lastused, MEMTBLSIZE,
+  dprintf(idx, _("Memory table: %d/%d (%.1f%% full)\n"), lastused, MEMTBLSIZE,
           per);
   per = ((exp * 1.0) / (memused * 1.0)) * 100.0;
   if (per != 100.0)
-    dprintf(idx, "Memory fault: only accounting for %d/%ld (%.1f%%)\n",
+    dprintf(idx, _("Memory fault: only accounting for %d/%ld (%.1f%%)\n"),
             exp, memused, per);
-  dprintf(idx, "Memory table itself occupies an additional %dk static\n",
+  dprintf(idx, _("Memory table itself occupies an additional %dk static\n"),
           (int) (sizeof(memtbl) / 1024));
 #endif
 }
@@ -194,7 +194,7 @@
         if (!strcmp(fn, me->name))
           me->mem_work += l;
     } else
-      dprintf(idx, "Not logging file %s!\n", fn);
+      dprintf(idx, _("Not logging file %s!\n"), fn);
   }
 
   for (i = 0; i < MAX_MEM; i++) {
@@ -246,10 +246,10 @@
     }
 
     if (use[i] == exp[i])
-      dprintf(idx, "File '%-10s' accounted for %lu/%lu (ok)\n", fn, exp[i],
+      dprintf(idx, _("File '%-10s' accounted for %lu/%lu (ok)\n"), fn, exp[i],
               use[i]);
     else {
-      dprintf(idx, "File '%-10s' accounted for %lu/%lu (debug follows:)\n",
+      dprintf(idx, _("File '%-10s' accounted for %lu/%lu (debug follows:)\n"),
               fn, exp[i], use[i]);
       strcpy(sofar, "   ");
       for (j = 0; j < lastused; j++) {
@@ -286,10 +286,10 @@
     if ((f != NULL) && (f[MODCALL_EXPMEM] != NULL))
       expt = f[MODCALL_EXPMEM] ();
     if (me->mem_work == expt)
-      dprintf(idx, "Module '%-10s' accounted for %lu/%lu (ok)\n", me->name,
+      dprintf(idx, _("Module '%-10s' accounted for %lu/%lu (ok)\n"), me->name,
               expt, me->mem_work);
     else {
-      dprintf(idx, "Module '%-10s' accounted for %lu/%lu (debug follows:)\n",
+      dprintf(idx, _("Module '%-10s' accounted for %lu/%lu (debug follows:)\n"),
               me->name, expt, me->mem_work);
       strcpy(sofar, "   ");
       for (j = 0; j < lastused; j++) {
@@ -315,9 +315,9 @@
     }
   }
 
-  dprintf(idx, "--- End of debug memory list.\n");
+  dprintf(idx, _("--- End of debug memory list.\n"));
 #else
-  dprintf(idx, "Compiled without extensive memory debugging (sorry).\n");
+  dprintf(idx, _("Compiled without extensive memory debugging (sorry).\n"));
 #endif
   tell_netdebug(idx);
 }
@@ -333,14 +333,14 @@
 
   x = (void *) malloc(size);
   if (x == NULL) {
-    putlog(LOG_MISC, "*", "*** FAILED MALLOC %s (%d) (%d): %s", file, line,
+    putlog(LOG_MISC, "*", _("*** FAILED MALLOC %s (%d) (%d): %s"), file, line,
            size, strerror(errno));
-    fatal("Memory allocation failed", 0);
+    fatal(_("Memory allocation failed"), 0);
   }
 #ifdef DEBUG_MEM
   if (lastused == MEMTBLSIZE) {
-    putlog(LOG_MISC, "*", "*** MEMORY TABLE FULL: %s (%d)", file, line);
-    fatal("Memory table full", 0);
+    putlog(LOG_MISC, "*", _("*** MEMORY TABLE FULL: %s (%d)"), file, line);
+    fatal(_("Memory table full"), 0);
   }
   i = lastused;
   memtbl[i].ptr = x;
@@ -371,13 +371,13 @@
   x = (void *) realloc(ptr, size);
   if (x == NULL && size > 0) {
     i = i;
-    putlog(LOG_MISC, "*", "*** FAILED REALLOC %s (%d)", file, line);
+    putlog(LOG_MISC, "*", _("*** FAILED REALLOC %s (%d)"), file, line);
     return NULL;
   }
 #ifdef DEBUG_MEM
   for (i = 0; (i < lastused) && (memtbl[i].ptr != ptr); i++);
   if (i == lastused) {
-    putlog(LOG_MISC, "*", "*** ATTEMPTING TO REALLOC NON-MALLOC'D PTR: %s (%d)",
+    putlog(LOG_MISC, "*", _("*** ATTEMPTING TO REALLOC NON-MALLOC'D PTR: %s (%d)"),
            file, line);
     return NULL;
   }
@@ -398,7 +398,7 @@
   int i = 0;
 
   if (ptr == NULL) {
-    putlog(LOG_MISC, "*", "*** ATTEMPTING TO FREE NULL PTR: %s (%d)",
+    putlog(LOG_MISC, "*", _("*** ATTEMPTING TO FREE NULL PTR: %s (%d)"),
            file, line);
     i = i;
     return;
@@ -408,7 +408,7 @@
   if (line) {
     for (i = 0; (i < lastused) && (memtbl[i].ptr != ptr); i++);
     if (i == lastused) {
-      putlog(LOG_MISC, "*", "*** ATTEMPTING TO FREE NON-MALLOC'D PTR: %s (%d)",
+      putlog(LOG_MISC, "*", _("*** ATTEMPTING TO FREE NON-MALLOC'D PTR: %s (%d)"),
              file, line);
       return;
     }
Index: eggdrop1.8/src/modules.c
diff -u eggdrop1.8/src/modules.c:1.3 eggdrop1.8/src/modules.c:1.3.2.1
--- eggdrop1.8/src/modules.c:1.3	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/modules.c	Mon Nov  8 04:02:30 2010
@@ -4,7 +4,7 @@
  *
  * by Darrin Smith (beldin at light.iinet.net.au)
  *
- * $Id: modules.c,v 1.3 2010/10/19 12:13:33 pseudo Exp $
+ * $Id: modules.c,v 1.3.2.1 2010/11/08 10:02:30 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -165,7 +165,7 @@
 static void null_share(int idx, char *x)
 {
   if ((x[0] == 'u') && (x[1] == 'n')) {
-    putlog(LOG_BOTS, "*", "User file rejected by %s: %s", dcc[idx].nick, x + 3);
+    putlog(LOG_BOTS, "*", _("User file rejected by %s: %s"), dcc[idx].nick, x + 3);
     dcc[idx].status &= ~STAT_OFFERED;
     if (!(dcc[idx].status & STAT_GETTING)) {
       dcc[idx].status &= ~STAT_SHARE;
@@ -705,12 +705,12 @@
 #endif /* !STATIC */
 
   if (module_find(name, 0, 0) != NULL)
-    return MOD_ALREADYLOAD;
+    return _("Already loaded.");
 
 #ifndef STATIC
   if (moddir[0] != '/') {
     if (getcwd(workbuf, 1024) == NULL)
-      return MOD_BADCWD;
+      return _("Can't determine current directory.");
     sprintf(&(workbuf[strlen(workbuf)]), "/%s%s." EGG_MOD_EXT, moddir, name);
   } else {
     sprintf(workbuf, "%s%s." EGG_MOD_EXT, moddir, name);
@@ -719,7 +719,7 @@
 #  ifdef MOD_USE_SHL
   hand = shl_load(workbuf, BIND_IMMEDIATE, 0L);
   if (!hand)
-    return "Can't load module.";
+    return _("Can't load module.");
   sprintf(workbuf, "%s_start", name);
   if (shl_findsym(&hand, workbuf, (short) TYPE_PROCEDURE, (void *) &f))
     f = NULL;
@@ -731,14 +731,14 @@
   }
   if (f == NULL) {
     shl_unload(hand);
-    return MOD_NOSTARTDEF;
+    return _("No start function defined.");
   }
 #  endif /* MOD_USE_SHL */
 
 #  ifdef MOD_USE_DYLD
   ret = NSCreateObjectFileImageFromFile(workbuf, &file);
   if (ret != NSObjectFileImageSuccess)
-    return "Can't load module.";
+    return _("Can't load module.");
   hand = NSLinkModule(file, workbuf, DYLDFLAGS);
   sprintf(workbuf, "_%s_start", name);
   sym = NSLookupSymbolInModule(hand, workbuf);
@@ -748,25 +748,25 @@
     f = NULL;
   if (f == NULL) {
     NSUnLinkModule(hand, NSUNLINKMODULE_OPTION_NONE);
-    return MOD_NOSTARTDEF;
+    return _("No start function defined.");
   }
 #  endif /* MOD_USE_DYLD */
 
 #  ifdef MOD_USE_RLD
   ret = rld_load(NULL, (struct mach_header **) 0, workbuf, (const char *) 0);
   if (!ret)
-    return "Can't load module.";
+    return _("Can't load module.");
   sprintf(workbuf, "_%s_start", name);
   ret = rld_lookup(NULL, workbuf, &f)
   if (!ret || f == NULL)
-    return MOD_NOSTARTDEF;
+    return _("No start function defined.");
   /* There isn't a reliable way to unload at this point... just keep it loaded. */
 #  endif /* MOD_USE_DYLD */
 
 #  ifdef MOD_USE_LOADER
   hand = load(workbuf, LDR_NOFLAGS);
   if (hand == LDR_NULL_MODULE)
-    return "Can't load module.";
+    return _("Can't load module.");
   sprintf(workbuf, "%s_start", name);
   f = (Function) ldr_lookup_package(hand, workbuf);
   if (f == NULL) {
@@ -775,7 +775,7 @@
   }
   if (f == NULL) {
     unload(hand);
-    return MOD_NOSTARTDEF;
+    return _("No start function defined.");
   }
 #  endif /* MOD_USE_LOADER */
 
@@ -791,7 +791,7 @@
   }
   if (f == NULL) {
     dlclose(hand);
-    return MOD_NOSTARTDEF;
+    return _("No start function defined.");
   }
 #  endif /* MOD_USE_DL */
 #endif /* !STATIC */
@@ -799,13 +799,13 @@
 #ifdef STATIC
   for (sl = static_modules; sl && egg_strcasecmp(sl->name, name); sl = sl->next);
   if (!sl)
-    return "Unknown module.";
+    return _("Unknown module.");
   f = (Function) sl->func;
 #endif /* STATIC */
 
   p = nmalloc(sizeof(module_entry));
   if (p == NULL)
-    return "Malloc error";
+    return _("Malloc error");
   p->name = nmalloc(strlen(name) + 1);
   strcpy(p->name, name);
   p->major = 0;
@@ -826,9 +826,9 @@
   check_tcl_load(name);
 
   if (exist_lang_section(name))
-    putlog(LOG_MISC, "*", MOD_LOADED_WITH_LANG, name);
+    putlog(LOG_MISC, "*", _("Module loaded: %-16s (with lang support)"), name);
   else
-    putlog(LOG_MISC, "*", MOD_LOADED, name);
+    putlog(LOG_MISC, "*", _("Module loaded: %-16s"), name);
 
   return NULL;
 }
@@ -845,11 +845,11 @@
 
       for (d = dependancy_list; d; d = d->next)
         if (d->needed == p)
-          return MOD_NEEDED;
+          return _("Needed by another module");
 
       f = p->funcs;
       if (f && !f[MODCALL_CLOSE])
-        return MOD_NOCLOSEDEF;
+        return _("No close function");
       if (f) {
         check_tcl_unld(name);
         e = (((char *(*)()) f[MODCALL_CLOSE]) (user));
@@ -876,14 +876,14 @@
       else
         o->next = p->next;
       nfree(p);
-      putlog(LOG_MISC, "*", "%s %s", MOD_UNLOADED, name);
+      putlog(LOG_MISC, "*", "%s %s", _("Module unloaded:"), name);
       return NULL;
     }
     o = p;
     p = p->next;
   }
 
-  return MOD_NOSUCH;
+  return _("No such module");
 }
 
 module_entry *module_find(char *name, int major, int minor)
@@ -1161,18 +1161,18 @@
   module_entry *p = module_list;
 
   if (p && !which)
-    dprintf(idx, "Loaded module information:\n");
+    dprintf(idx, _("Loaded module information:\n"));
   for (; p; p = p->next) {
     if (!which || !egg_strcasecmp(which, p->name)) {
       dependancy *d;
 
       if (details)
-        dprintf(idx, "  Module: %s, v %d.%d\n", p->name ? p->name : "CORE",
+        dprintf(idx, _("  Module: %s, v %d.%d\n"), p->name ? p->name : "CORE",
                 p->major, p->minor);
       if (details > 1) {
         for (d = dependancy_list; d; d = d->next)
           if (d->needing == p)
-            dprintf(idx, "    requires: %s, v %d.%d\n", d->needed->name,
+            dprintf(idx, _("    requires: %s, v %d.%d\n"), d->needed->name,
                     d->major, d->minor);
       }
       if (p->funcs) {
@@ -1186,5 +1186,5 @@
     }
   }
   if (which)
-    dprintf(idx, "No such module.\n");
+    dprintf(idx, _("No such module.\n"));
 }
Index: eggdrop1.8/src/net.c
diff -u eggdrop1.8/src/net.c:1.6 eggdrop1.8/src/net.c:1.6.2.1
--- eggdrop1.8/src/net.c:1.6	Wed Oct 20 07:07:13 2010
+++ eggdrop1.8/src/net.c	Mon Nov  8 04:02:30 2010
@@ -2,7 +2,7 @@
  * net.c -- handles:
  *   all raw network i/o
  *
- * $Id: net.c,v 1.6 2010/10/20 13:07:13 pseudo Exp $
+ * $Id: net.c,v 1.6.2.1 2010/11/08 10:02:30 pseudo Exp $
  */
 /*
  * This is hereby released into the public domain.
@@ -331,7 +331,7 @@
   struct threaddata *td = threaddata();
 
   if (i == -1) {
-    putlog(LOG_MISC, "*", "Sockettable full.");
+    putlog(LOG_MISC, "*", _("Socket table full."));
     return;
   }
   if (((sock != STDOUT) || backgrd) && !(td->socklist[i].flags & SOCK_NONSOCK)) {
@@ -357,7 +357,7 @@
   if (sock >= 0)
     setsock(sock, options);
   else
-    putlog(LOG_MISC, "*", "Warning: Can't create new socket: %s!",
+    putlog(LOG_MISC, "*", _("Warning: Can't create new socket: %s!"),
            strerror(errno));
   return sock;
 }
@@ -399,7 +399,8 @@
       return;
     }
   }
-  putlog(LOG_MISC, "*", "Warning: Attempt to kill un-allocated socket %d!", sock);
+  putlog(LOG_MISC, "*", _("Warning: Attempt to kill un-allocated socket %d!"),
+         sock);
 }
 
 /* Done with a tcl socket
@@ -434,8 +435,8 @@
     return -2;
 #ifdef IPV6
   if (addr->family == AF_INET6) {
-    putlog(LOG_MISC, "*", "Eggdrop doesn't support IPv6 connections "
-           "through proxies yet.");
+    putlog(LOG_MISC, "*", _("Eggdrop doesn't support IPv6 connections "
+           "through proxies yet."));
     return -1;
   }
 #endif
@@ -773,7 +774,7 @@
 	      if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
 	        errno = EAGAIN;
               else
-                debug1("SSL error: %s", ERR_error_string(ERR_get_error(), 0));
+                debug1(_("SSL error: %s"), ERR_error_string(ERR_get_error(), 0));
               x = -1;
             }
           } else
@@ -1097,7 +1098,7 @@
             errno = EAGAIN;
           else if (!inhere) { /* Out there, somewhere */
             inhere = 1;
-            debug1("SSL error: %s", ERR_error_string(ERR_get_error(), 0));
+            debug1(_("SSL error: %s"), ERR_error_string(ERR_get_error(), 0));
             inhere = 0;
           }
           x = -1;
@@ -1121,7 +1122,7 @@
   if (!inhere) {
     inhere = 1;
 
-    putlog(LOG_MISC, "*", "!!! writing to nonexistent socket: %d", z);
+    putlog(LOG_MISC, "*", _("!!! writing to nonexistent socket: %d"), z);
     s[strlen(s) - 1] = 0;
     putlog(LOG_MISC, "*", "!-> '%s'", s);
 
@@ -1180,7 +1181,7 @@
           if (err == SSL_ERROR_WANT_WRITE || err == SSL_ERROR_WANT_READ)
             errno = EAGAIN;
           else
-            debug1("SSL error: %s", ERR_error_string(ERR_get_error(), 0));
+            debug1(_("SSL error: %s"), ERR_error_string(ERR_get_error(), 0));
           x = -1;
         }
       } else
@@ -1303,15 +1304,15 @@
     return 1;
 
   if (prt < 1) {
-    putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an impossible port of %u!",
-           nick, from, prt);
+    putlog(LOG_MISC, "*", _("ALERT: (%s!%s) specified an impossible port "
+           "of %u!"), nick, from, from, prt);
     return 0;
   }
 #ifdef IPV6
   if (strchr(ipaddy, ':')) {
     if (inet_pton(AF_INET6, ipaddy, &name.addr.s6.sin6_addr) != 1) {
-      putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an invalid IPv6 "
-             "address of %s!", nick, from, ipaddy);
+      putlog(LOG_MISC, "*", _("ALERT: (%s!%s) specified an invalid IPv6 "
+             "address of %s!"), nick, from, ipaddy);
       return 0;
     }
     if (IN6_IS_ADDR_V4MAPPED(&name.addr.s6.sin6_addr))
@@ -1320,7 +1321,7 @@
 #endif
   if (ip && inet_ntop(AF_INET, &ip, badaddress, sizeof badaddress) &&
       (ip < (1 << 24))) {
-    putlog(LOG_MISC, "*", "ALERT: (%s!%s) specified an impossible IP of %s!",
+    putlog(LOG_MISC, "*", _("ALERT: (%s!%s) specified an impossible IP of %s!"),
            nick, from, badaddress);
     return 0;
   }
@@ -1347,12 +1348,12 @@
    */
   strncpyz(hostn, extracthostname(from), sizeof hostn);
   if (!egg_strcasecmp(hostn, dnsname)) {
-    putlog(LOG_DEBUG, "*", "DNS information for submitted IP checks out.");
+    putlog(LOG_DEBUG, "*", _("DNS information for submitted IP checks out."));
     return 1;
   }
   if (!strcmp(badaddress, dnsname))
-    putlog(LOG_MISC, "*", "ALERT: (%s!%s) sent a DCC request with bogus IP "
-           "information of %s port %s. %s does not resolve to %s!", nick, from,
+    putlog(LOG_MISC, "*", _("ALERT: (%s!%s) sent a DCC request with bogus IP "
+           "information of %s port %s. %s does not resolve to %s!"), nick, from,
            badaddress, prt, from, badaddress);
   else
     return 1;                   /* <- usually happens when we have
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.25.2.1 eggdrop1.8/src/patch.h:1.25.2.2
--- eggdrop1.8/src/patch.h:1.25.2.1	Sat Nov  6 14:57:41 2010
+++ eggdrop1.8/src/patch.h	Mon Nov  8 04:02:31 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.25.2.1 2010/11/06 20:57:41 pseudo Exp $
+ * $Id: patch.h,v 1.25.2.2 2010/11/08 10:02:31 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1289076558");            /* current unixtime */
+patch("1289210474");            /* current unixtime */
 /*
  *
  *
  */
-patch("gettextprep");
+patch("lang2gettext-1");
 /*
  *
  *
Index: eggdrop1.8/src/tcl.c
diff -u eggdrop1.8/src/tcl.c:1.9 eggdrop1.8/src/tcl.c:1.9.2.1
--- eggdrop1.8/src/tcl.c:1.9	Tue Oct 26 03:16:36 2010
+++ eggdrop1.8/src/tcl.c	Mon Nov  8 04:02:31 2010
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.9 2010/10/26 09:16:36 pseudo Exp $
+ * $Id: tcl.c,v 1.9.2.1 2010/11/08 10:02:31 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -112,13 +112,13 @@
   if (egg_strcasecmp(botnetnick, new)) {
     /* Trying to change bot's nickname */
     if (tands > 0) {
-      putlog(LOG_MISC, "*", "* Tried to change my botnet nick, but I'm still "
-             "linked to a botnet.");
-      putlog(LOG_MISC, "*", "* (Unlink and try again.)");
+      putlog(LOG_MISC, "*", _("* Tried to change my botnet nick, but I'm still "
+             "linked to a botnet."));
+      putlog(LOG_MISC, "*", _("* (Unlink and try again.)"));
       return;
     } else {
       if (botnetnick[0])
-        putlog(LOG_MISC, "*", "* IDENTITY CHANGE: %s -> %s", botnetnick, new);
+        putlog(LOG_MISC, "*", _("* IDENTITY CHANGE: %s -> %s"), botnetnick, new);
       strcpy(botnetnick, new);
     }
   }
@@ -877,7 +877,7 @@
 #endif
 
   if (code != TCL_OK) {
-    putlog(LOG_MISC, "*", "Tcl error in script for '%s':", whatzit);
+    putlog(LOG_MISC, "*", _("Tcl error in script for '%s':"), whatzit);
     putlog(LOG_MISC, "*", "%s", result);
   }
 
@@ -912,7 +912,7 @@
 #endif
 
   if (code != TCL_OK) {
-    putlog(LOG_MISC, "*", "Tcl error in file '%s':", fname);
+    putlog(LOG_MISC, "*", _("Tcl error in file '%s':"), fname);
     putlog(LOG_MISC, "*", "%s", result);
     code = 0; /* JJM: refactored to remove premature return */
   } else {
Index: eggdrop1.8/src/tclhash.c
diff -u eggdrop1.8/src/tclhash.c:1.3 eggdrop1.8/src/tclhash.c:1.3.2.1
--- eggdrop1.8/src/tclhash.c:1.3	Sat Oct 23 05:16:13 2010
+++ eggdrop1.8/src/tclhash.c	Mon Nov  8 04:02:31 2010
@@ -7,7 +7,7 @@
  *   (non-Tcl) procedure lookups for msg/dcc/file commands
  *   (Tcl) binding internal procedures to msg/dcc/file commands
  *
- * $Id: tclhash.c,v 1.3 2010/10/23 11:16:13 pseudo Exp $
+ * $Id: tclhash.c,v 1.3.2.1 2010/11/08 10:02:31 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -259,7 +259,7 @@
     tl_next = tl->next;
 
     if (!(tl->flags |= HT_DELETED))
-      putlog(LOG_DEBUG, "*", "De-Allocated bind table %s", tl->name);
+      putlog(LOG_DEBUG, "*", _("De-Allocated bind table %s"), tl->name);
     tcl_bind_list_delete(tl);
   }
   H_log = NULL;
@@ -298,7 +298,7 @@
     bind_table_list = tl;
   }
 
-  putlog(LOG_DEBUG, "*", "Allocated bind table %s (flags %d)", nme, flg);
+  putlog(LOG_DEBUG, "*", _("Allocated bind table %s (flags %d)"), nme, flg);
   return tl;
 }
 
@@ -311,11 +311,11 @@
       continue;
     if (tl == tl_which) {
       tl->flags |= HT_DELETED;
-      putlog(LOG_DEBUG, "*", "De-Allocated bind table %s", tl->name);
+      putlog(LOG_DEBUG, "*", _("De-Allocated bind table %s"), tl->name);
       return;
     }
   }
-  putlog(LOG_DEBUG, "*", "??? Tried to delete not listed bind table ???");
+  putlog(LOG_DEBUG, "*", _("??? Tried to delete not listed bind table ???"));
 }
 
 tcl_bind_list_t *find_bind_table(const char *nme)
@@ -942,11 +942,11 @@
   x = check_tcl_bind(H_dcc, cmd, &fr, " $_dcc1 $_dcc2 $_dcc3",
                      MATCH_PARTIAL | BIND_USE_ATTR | BIND_HAS_BUILTINS);
   if (x == BIND_AMBIGUOUS) {
-    dprintf(idx, MISC_AMBIGUOUS);
+    dprintf(idx, _("Ambiguous command.\n"));
     return 0;
   }
   if (x == BIND_NOMATCH) {
-    dprintf(idx, MISC_NOSUCHCMD);
+    dprintf(idx, _("What?  You need '.help'\n"));
     return 0;
   }
 
@@ -1251,8 +1251,8 @@
   if (tl_kind == NULL && name && name[0] && egg_strcasecmp(name, "all"))
     patmatc = 1;
 
-  dprintf(idx, MISC_CMDBINDS);
-  dprintf(idx, "  TYPE FLAGS    COMMAND              HITS BINDING (TCL)\n");
+  dprintf(idx, _("Command bindings:\n"));
+  dprintf(idx, _("  TYPE FLAGS    COMMAND              HITS BINDING (TCL)\n"));
 
   for (tl = tl_kind ? tl_kind : bind_table_list; tl;
        tl = tl_kind ? 0 : tl->next) {
@@ -1288,11 +1288,11 @@
   }
   if (!fnd) {
     if (patmatc)
-      dprintf(idx, "No command bindings found that match %s\n", name);
+      dprintf(idx, _("No command bindings found that match %s\n"), name);
     else if (tl_kind)
-      dprintf(idx, "No command bindings for type: %s.\n", name);
+      dprintf(idx, _("No command bindings for type: %s.\n"), name);
     else
-      dprintf(idx, "No command bindings exist.\n");
+      dprintf(idx, _("No command bindings exist.\n"));
   }
 }
 
Index: eggdrop1.8/src/tls.c
diff -u eggdrop1.8/src/tls.c:1.2 eggdrop1.8/src/tls.c:1.2.2.1
--- eggdrop1.8/src/tls.c:1.2	Tue Oct 19 08:20:56 2010
+++ eggdrop1.8/src/tls.c	Mon Nov  8 04:02:32 2010
@@ -4,7 +4,7 @@
  *   Certificate handling
  *   OpenSSL initialization and shutdown
  *
- * $Id: tls.c,v 1.2 2010/10/19 14:20:56 pseudo Exp $
+ * $Id: tls.c,v 1.2.2.1 2010/11/08 10:02:32 pseudo Exp $
  */
 /*
  * Written by Rumen Stoyanov <pseudo at egg6.net>
@@ -126,7 +126,7 @@
   SSL_library_init();
 
   if (ssl_seed()) {
-    putlog(LOG_MISC, "*", "TLS: unable to seed PRNG. Disabling SSL");
+    putlog(LOG_MISC, "*", _("TLS: unable to seed PRNG. Disabling SSL"));
     ERR_free_strings();
     return -2;
   }
@@ -134,29 +134,29 @@
      supported protocols (SSLv2, SSLv3, and TLSv1) */
   if (!(ssl_ctx = SSL_CTX_new(SSLv23_method()))) {
     debug0(ERR_error_string(ERR_get_error(), NULL));
-    putlog(LOG_MISC, "*", "TLS: unable to create context. Disabling SSL.");
+    putlog(LOG_MISC, "*", _("TLS: unable to create context. Disabling SSL."));
     ERR_free_strings();
     return -1;
   }
   /* Load our own certificate and private key. Mandatory for acting as
      server, because we don't support anonymous ciphers by default. */
   if (SSL_CTX_use_certificate_chain_file(ssl_ctx, tls_certfile) != 1)
-    debug1("TLS: unable to load own certificate: %s",
+    debug1(_("TLS: unable to load own certificate: %s"),
            ERR_error_string(ERR_get_error(), NULL));
   if (SSL_CTX_use_PrivateKey_file(ssl_ctx, tls_keyfile,
       SSL_FILETYPE_PEM) != 1)
-    debug1("TLS: unable to load private key: %s",
+    debug1(_("TLS: unable to load private key: %s"),
            ERR_error_string(ERR_get_error(), NULL));
   if ((tls_capath[0] || tls_cafile[0]) &&
       !SSL_CTX_load_verify_locations(ssl_ctx, tls_cafile[0] ? tls_cafile : NULL,
       tls_capath[0] ? tls_capath : NULL))
-    debug1("TLS: unable to set CA certificates location: %s",
+    debug1(_("TLS: unable to set CA certificates location: %s"),
            ERR_error_string(ERR_get_error(), NULL));
   /* Let advanced users specify the list of allowed ssl ciphers */
   if (tls_ciphers[0])
     if (!SSL_CTX_set_cipher_list(ssl_ctx, tls_ciphers)) {
       /* this replaces any preset ciphers so an invalid list is fatal */
-      putlog(LOG_MISC, "*", "TLS: no valid ciphers found. Disabling SSL.");
+      putlog(LOG_MISC, "*", _("TLS: no valid ciphers found. Disabling SSL."));
       ERR_free_strings();
       SSL_CTX_free(ssl_ctx);
       ssl_ctx = NULL;
@@ -352,17 +352,17 @@
     /* the following is just for information */
     switch (crit) {
       case 0:
-        debug0("TLS: X509 subjectAltName cannot be decoded");
+        debug0(_("TLS: X509 subjectAltName cannot be decoded"));
         break;
       case -1:
-        debug0("TLS: X509 has no subjectAltName extension");
+        debug0(_("TLS: X509 has no subjectAltName extension"));
         break;
       case -2:
-        debug0("TLS: X509 has multiple subjectAltName extensions");
+        debug0(_("TLS: X509 has multiple subjectAltName extensions"));
     }
     /* no subject name either? A completely broken certificate :) */
     if (!(subj = X509_get_subject_name(cert))) {
-      putlog(data->loglevel, "*", "TLS: peer certificate has no subject: %s",
+      putlog(data->loglevel, "*", _("TLS: peer certificate has no subject: %s"),
              data->host);
       match = 0;
     } else { /* we have a subject name, look at it */
@@ -372,15 +372,16 @@
       /* Look for commonName attributes in the subject name */
       pos = X509_NAME_get_index_by_NID(subj, NID_commonName, pos);
       if (pos == -1) /* sorry */
-        putlog(data->loglevel, "*", "TLS: Peer has no common names and "
-              "no subjectAltName extension. Verification failed.");
+        putlog(data->loglevel, "*", _("TLS: Peer has no common names and "
+              "no subjectAltName extension. Verification failed."));
       /* Loop through all common names which may be present in the subject
          name until we find a match. */
       while (!match && pos != -1) {
         name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, pos));
         cn = (char *) ASN1_STRING_data(name);
         if (ip)
-          match = a2i_IPADDRESS(cn) ? (ASN1_STRING_cmp(ip, a2i_IPADDRESS(cn)) ? 0 : 1) : 0;
+          match = a2i_IPADDRESS(cn) ? (ASN1_STRING_cmp(ip, a2i_IPADDRESS(cn)) ?
+                                                       0 : 1) : 0;
         else
           match = ssl_hostmatch(cn, data->host);
         pos = X509_NAME_get_index_by_NID(subj, NID_commonName, pos);
@@ -470,37 +471,37 @@
   /* Subject and issuer names */
   if ((name = X509_get_subject_name(cert))) {
     buf = ssl_printname(name);
-    putlog(loglev, "*", "TLS: certificate subject: %s", buf);
+    putlog(loglev, "*", _("TLS: certificate subject: %s"), buf);
     nfree(buf);
   } else
-    putlog(loglev, "*", "TLS: cannot get subject name from certificate!");
+    putlog(loglev, "*", _("TLS: cannot get subject name from certificate!"));
   if ((name = X509_get_issuer_name(cert))) {
     buf = ssl_printname(name);
-    putlog(loglev, "*", "TLS: certificate issuer: %s", buf);
+    putlog(loglev, "*", _("TLS: certificate issuer: %s"), buf);
     nfree(buf);
   } else
-    putlog(loglev, "*", "TLS: cannot get issuer name from certificate!");
+    putlog(loglev, "*", _("TLS: cannot get issuer name from certificate!"));
   
   /* Fingerprints */
   X509_digest(cert, EVP_md5(), md, &len); /* MD5 hash */
   if (len <= sizeof(md)) {
     buf = hex_to_string(md, len);
-    putlog(loglev, "*", "TLS: certificate MD5 Fingerprint: %s", buf);
+    putlog(loglev, "*", _("TLS: certificate MD5 Fingerprint: %s"), buf);
     OPENSSL_free(buf);
   }
   X509_digest(cert, EVP_sha1(), md, &len); /* SHA-1 hash */
   if (len <= sizeof(md)) {
     buf = hex_to_string(md, len);
-    putlog(loglev, "*", "TLS: certificate SHA1 Fingerprint: %s", buf);
+    putlog(loglev, "*", _("TLS: certificate SHA1 Fingerprint: %s"), buf);
     OPENSSL_free(buf);
   }
 
   /* Validity time */
   from = ssl_printtime(X509_get_notBefore(cert));
   to = ssl_printtime(X509_get_notAfter(cert));
-  putlog(loglev, "*", "TLS: certificate valid from %s to %s", from, to);
+  putlog(loglev, "*", _("TLS: certificate valid from %s to %s"), from, to);
   nfree(from);
-  nfree(to);
+  nfree(to);	
 }
 
 /* Certificate validation callback
@@ -546,8 +547,8 @@
      */
     if (!(data->flags & TLS_DEPTH0) && !ssl_verifycn(cert, data) &&
         (data->verify & TLS_VERIFYCN)) {
-        putlog(data->loglevel, "*", "TLS: certificate validation failed. "
-               "Certificate subject does not match peer.");
+        putlog(data->loglevel, "*", _("TLS: certificate validation failed. "
+               "Certificate subject does not match peer."));
         return 0;
     }
     data->flags |= TLS_DEPTH0;
@@ -564,7 +565,7 @@
           (data->verify & TLS_VERIFYFROM)) ||
           ((err == X509_V_ERR_CERT_HAS_EXPIRED) &&
           (data->verify & TLS_VERIFYTO))) {
-        debug1("TLS: peer certificate warning: %s",
+        debug1(_("TLS: peer certificate warning: %s"),
                X509_verify_cert_error_string(err));
         ok = 1;
       }
@@ -572,7 +573,7 @@
   if (ok || !data->verify)
     return 1;
   putlog(data->loglevel, "*",
-         "TLS: certificate validation failed at depth %d: %s",
+         _("TLS: certificate validation failed at depth %d: %s"),
          depth, X509_verify_cert_error_string(err));
   return 0;
 }
@@ -605,26 +606,26 @@
     if (check_tcl_tls(sock))
       return;
 
-    putlog(data->loglevel, "*", "TLS: handshake successful. Secure connection "
-           "established.");
+    putlog(data->loglevel, "*", _("TLS: handshake successful. "
+           "Secure connection established."));
 
     if ((cert = SSL_get_peer_certificate(ssl))) 
       ssl_showcert(cert, data->loglevel);
     else
-      putlog(data->loglevel, "*", "TLS: peer did not present a certificate");
+      putlog(data->loglevel, "*", _("TLS: peer did not present a certificate"));
 
     /* Display cipher information */
     cipher = SSL_get_current_cipher(ssl);
     processed = SSL_CIPHER_get_bits(cipher, &secret);
-    putlog(data->loglevel, "*", "TLS: cipher used: %s %s; %d bits (%d secret)",
-           SSL_CIPHER_get_name(cipher), SSL_CIPHER_get_version(cipher),
-           processed, secret);
+    putlog(data->loglevel, "*", _("TLS: cipher used: %s %s; "
+           "%d bits (%d secret)"), SSL_CIPHER_get_name(cipher),
+           SSL_CIPHER_get_version(cipher), processed, secret);
     /* secret are the actually secret bits. If processed and secret differ,
        the rest of the bits are fixed, i.e. for limited export ciphers */
 
     /* More verbose information, for debugging only */
     SSL_CIPHER_description(cipher, buf, sizeof buf);
-    debug1("TLS: cipher details: %s", buf);
+    debug1(_("TLS: cipher details: %s"), buf);
   }
 
   /* Display the state of the engine for debugging purposes */
@@ -655,25 +656,25 @@
   ssl_appdata *data;
   struct threaddata *td = threaddata();
 
-  debug0("TLS: attempting SSL negotiation...");
+  debug0(_("TLS: attempting SSL negotiation..."));
   if (!ssl_ctx && ssl_init()) {
-    debug0("TLS: Failed. OpenSSL not initialized properly.");
+    debug0(_("TLS: Failed. OpenSSL not initialized properly."));
     return -1;
   }
   /* find the socket in the list */
   i = findsock(sock);
   if (i == -1) {
-    debug0("TLS: socket not in socklist");
+    debug0(_("TLS: socket not in socklist"));
     return -2;
   }
   if (td->socklist[i].ssl) {
-    debug0("TLS: handshake not required - SSL session already established");
+    debug0(_("TLS: handshake not required - SSL session already established"));
     return 0;
   }
   td->socklist[i].ssl = SSL_new(ssl_ctx);
   if (!td->socklist[i].ssl ||
       !SSL_set_fd(td->socklist[i].ssl, td->socklist[i].sock)) {
-    debug1("TLS: cannot initiate SSL session - %s",
+    debug1(_("TLS: cannot initiate SSL session - %s"),
            ERR_error_string(ERR_get_error(), 0));
     return -3;
   }
@@ -700,7 +701,7 @@
     SSL_set_verify(td->socklist[i].ssl, SSL_VERIFY_PEER, ssl_verify);
     ret = SSL_connect(td->socklist[i].ssl);
     if (!ret)
-      debug0("TLS: connect handshake failed.");
+      debug0(_("TLS: connect handshake failed."));
   } else {
     if (data->flags & TLS_VERIFYPEER)
       SSL_set_verify(td->socklist[i].ssl, SSL_VERIFY_PEER |
@@ -709,19 +710,19 @@
       SSL_set_verify(td->socklist[i].ssl, SSL_VERIFY_PEER, ssl_verify);
     ret = SSL_accept(td->socklist[i].ssl);
     if (!ret)
-      debug0("TLS: accept handshake failed");
+      debug0(_("TLS: accept handshake failed"));
   }
 
   err = SSL_get_error(td->socklist[i].ssl, ret);
   /* Normal condition for async I/O, similar to EAGAIN */
   if (ret > 0 || err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) {
-    debug0("TLS: handshake in progress");
+    debug0(_("TLS: handshake in progress"));
     return 0;
   }
   if (ERR_peek_error())
-    debug0("TLS: handshake failed due to the following errors: ");
+    debug0(_("TLS: handshake failed due to the following errors: "));
   while ((err = ERR_get_error()))
-    debug1("TLS: %s", ERR_error_string(err, NULL));
+    debug1(_("TLS: %s"), ERR_error_string(err, NULL));
 
   /* Attempt failed, cleanup and abort */
   SSL_shutdown(td->socklist[i].ssl);
Index: eggdrop1.8/src/userrec.c
diff -u eggdrop1.8/src/userrec.c:1.2 eggdrop1.8/src/userrec.c:1.2.2.1
--- eggdrop1.8/src/userrec.c:1.2	Sun Oct 24 07:22:40 2010
+++ eggdrop1.8/src/userrec.c	Mon Nov  8 04:02:32 2010
@@ -4,7 +4,7 @@
  *   a bunch of functions to find and change user records
  *   change and check user (and channel-specific) flags
  *
- * $Id: userrec.c,v 1.2 2010/10/24 13:22:40 pseudo Exp $
+ * $Id: userrec.c,v 1.2.2.1 2010/11/08 10:02:32 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -554,12 +554,12 @@
   f = fopen(new_userfile, "w");
   chmod(new_userfile, userfile_perm);
   if (f == NULL) {
-    putlog(LOG_MISC, "*", USERF_ERRWRITE);
+    putlog(LOG_MISC, "*", _("ERROR writing user file."));
     nfree(new_userfile);
     return;
   }
   if (!quiet_save)
-    putlog(LOG_MISC, "*", USERF_WRITING);
+    putlog(LOG_MISC, "*", _("Writing user file..."));
 
   sort_userlist();
   tt = now;
@@ -570,7 +570,7 @@
     if (!write_user(u, f, idx))
       ok = 0;
   if (!ok || !write_ignores(f, -1) || fflush(f)) {
-    putlog(LOG_MISC, "*", "%s (%s)", USERF_ERRWRITE, strerror(ferror(f)));
+    putlog(LOG_MISC, "*", _("ERROR writing user file. (%s)"), strerror(ferror(f)));
     fclose(f);
     nfree(new_userfile);
     return;
@@ -603,7 +603,7 @@
       strncpyz(dcc[i].nick, newh, sizeof dcc[i].nick);
       if (dcc[i].type == &DCC_CHAT && dcc[i].u.chat->channel >= 0) {
         chanout_but(-1, dcc[i].u.chat->channel,
-                    "*** Handle change: %s -> %s\n", s, newh);
+                    _("*** Handle change: %s -> %s\n"), s, newh);
         if (dcc[i].u.chat->channel < GLOBAL_CHANS)
           botnet_send_nkch(i, s);
       }
Index: eggdrop1.8/src/users.c
diff -u eggdrop1.8/src/users.c:1.2 eggdrop1.8/src/users.c:1.2.2.1
--- eggdrop1.8/src/users.c:1.2	Thu Aug  5 12:12:05 2010
+++ eggdrop1.8/src/users.c	Mon Nov  8 04:02:33 2010
@@ -10,7 +10,7 @@
  *
  * dprintf'ized, 9nov1995
  *
- * $Id: users.c,v 1.2 2010/08/05 18:12:05 pseudo Exp $
+ * $Id: users.c,v 1.2.2.1 2010/11/08 10:02:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -185,7 +185,7 @@
   if (ignore->msg && ignore->msg[0])
     dprintf(idx, "        %s: %s\n", ignore->user, ignore->msg);
   else
-    dprintf(idx, "        %s %s\n", MODES_PLACEDBY, ignore->user);
+    dprintf(idx, "        %s %s\n", _("placed by"), ignore->user);
   if (dates[0])
     dprintf(idx, "        %s\n", dates);
 }
@@ -197,10 +197,10 @@
   int k = 1;
 
   if (u == NULL) {
-    dprintf(idx, "No ignores.\n");
+    dprintf(idx, _("No ignores.\n"));
     return;
   }
-  dprintf(idx, "%s:\n", IGN_CURRENT);
+  dprintf(idx, _("Currently ignoring:\n"));
   for (; u; u = u->next) {
     if (match[0]) {
       if (cmp_usermasks(match, u->igmask) ||
@@ -222,8 +222,7 @@
 
   while (*u) {
     if (!((*u)->flags & IGREC_PERM) && (now >= (*u)->expire)) {
-      putlog(LOG_MISC, "*", "%s %s (%s)", IGN_NOLONGER, (*u)->igmask,
-             MISC_EXPIRED);
+      putlog(LOG_MISC, "*", _("No longer ignoring %s (expired)"), (*u)->igmask);
       delignore((*u)->igmask);
     } else
       u = &((*u)->next);
@@ -305,8 +304,10 @@
       }
     }
   }
-  putlog(LOG_MISC, "*", "*** Malformed banline for %s.",
-         chan ? chan->dname : "global_bans");
+  if (chan)
+    putlog(LOG_MISC, "*", _("*** Malformed banline for chan %s."), chan->dname);
+  else
+    putlog(LOG_MISC, "*", _("*** Malformed banline for global_bans."));
 }
 
 static void restore_chanexempt(struct chanset_t *chan, char *host)
@@ -359,8 +360,10 @@
       }
     }
   }
-  putlog(LOG_MISC, "*", "*** Malformed exemptline for %s.",
-         chan ? chan->dname : "global_exempts");
+  if (chan)
+    putlog(LOG_MISC, "*", _("*** Malformed exemptline for chan %s."), chan->dname);
+  else
+    putlog(LOG_MISC, "*", _("*** Malformed exemptline for global_exempts."));
 }
 
 static void restore_chaninvite(struct chanset_t *chan, char *host)
@@ -413,8 +416,10 @@
       }
     }
   }
-  putlog(LOG_MISC, "*", "*** Malformed inviteline for %s.",
-         chan ? chan->dname : "global_invites");
+  if (chan)
+    putlog(LOG_MISC, "*", _("*** Malformed inviteline for chan %s."), chan->dname);
+  else
+    putlog(LOG_MISC, "*", _("*** Malformed inviteline for global_invites."));
 }
 
 static void restore_ignore(char *host)
@@ -466,7 +471,7 @@
       return;
     }
   }
-  putlog(LOG_MISC, "*", "*** Malformed ignore line.");
+  putlog(LOG_MISC, "*", _("*** Malformed ignore line."));
 }
 
 void tell_user(int idx, struct userrec *u, int master)
@@ -544,7 +549,7 @@
   if (u == NULL)
     u = get_user_by_host(id);
   if (u == NULL) {
-    dprintf(idx, "%s.\n", USERF_NOMATCH);
+    dprintf(idx, _("Can't find anyone matching that.\n"));
     return;
   }
   egg_snprintf(format, sizeof format,
@@ -565,13 +570,13 @@
   struct list_type *q;
   struct flag_record user, pls, mns;
 
-  dprintf(idx, "*** %s '%s':\n", MISC_MATCHING, mtch);
+  dprintf(idx, _("*** Matching '%s':\n"), mtch);
   cnt = 0;
   egg_snprintf(format, sizeof format,
                "%%-%us PASS NOTES FLAGS           LAST\n", HANDLEN);
   dprintf(idx, format, "HANDLE");
   if (start > 1)
-    dprintf(idx, "(%s %d)\n", MISC_SKIPPING, start - 1);
+    dprintf(idx, _("(skipping first %d)\n"), start - 1);
   if (strchr("+-&|", *mtch)) {
     user.match = pls.match = FR_GLOBAL | FR_BOT | FR_CHAN;
     break_down_flags(mtch, &pls, &mns);
@@ -582,7 +587,7 @@
       if (!pls.global && !pls.udef_global && !pls.chan && !pls.udef_chan &&
           !pls.bot) {
         /* happy now BB you weenie :P */
-        dprintf(idx, "Unknown flag specified for matching!!\n");
+        dprintf(idx, _("Unknown flag specified for matching!!\n"));
         return;
       }
     }
@@ -601,7 +606,7 @@
             tell_user(idx, u, master);
           }
           if (cnt == limit + 1) {
-            dprintf(idx, MISC_TRUNCATED, limit);
+            dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
           }
         }
       }
@@ -611,7 +616,7 @@
         tell_user(idx, u, master);
       }
       if (cnt == limit + 1) {
-        dprintf(idx, MISC_TRUNCATED, limit);
+        dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
       }
     } else {
       fnd = 0;
@@ -623,14 +628,14 @@
             tell_user(idx, u, master);
           }
           if (cnt == limit + 1) {
-            dprintf(idx, MISC_TRUNCATED, limit);
+            dprintf(idx, _("(more than %d matches; list truncated)\n"), limit);
           }
         }
       }
     }
   }
 
-  dprintf(idx, MISC_FOUNDMATCH, cnt, cnt == 1 ? "" : MISC_MATCH_PLURAL);
+  dprintf(idx, P_("--- Found one match.\n", "--- Found %d matches.\n", cnt), cnt);
 }
 
 /*
@@ -696,10 +701,12 @@
   s = buf;
   fgets(s, 180, f);
   if (s[1] < '4') {
-    fatal(USERF_OLDFMT, 0);
+    snprintf(buf, sizeof buf, _("Old userfile. Use '%s' to convert"),
+             "tclsh scripts/weed <userfile> c");
+    fatal(buf, 0);
   }
   if (s[1] > '4')
-    fatal(USERF_INVALID, 0);
+    fatal(_("Invalid userfile format."), 0);
   while (!feof(f)) {
     s = buf;
     fgets(s, 511, f);
@@ -921,12 +928,12 @@
           attr = newsplit(&s);
           rmspace(s);
           if (!attr[0] || !pass[0]) {
-            putlog(LOG_MISC, "*", "* %s '%s'!", USERF_CORRUPT, code);
+            putlog(LOG_MISC, "*", _("* Corrupt user record '%s'!"), code);
             lasthand[0] = 0;
           } else {
             u = get_user_by_handle(bu, code);
             if (u && !(u->flags & USER_UNSHARED)) {
-              putlog(LOG_MISC, "*", "* %s '%s'!", USERF_DUPE, code);
+              putlog(LOG_MISC, "*", _("* Duplicate user record '%s'!"), code);
               lasthand[0] = 0;
               u = NULL;
             } else if (u) {
@@ -940,7 +947,7 @@
               if (strlen(code) > HANDLEN)
                 code[HANDLEN] = 0;
               if (strlen(pass) > 20) {
-                putlog(LOG_MISC, "*", "* %s '%s'", USERF_BROKEPASS, code);
+                putlog(LOG_MISC, "*", _("* Corrupted password reset for '%s'"), code);
                 strcpy(pass, "-");
               }
               bu = adduser(bu, code, 0, pass,
@@ -961,14 +968,14 @@
   fclose(f);
   (*ret) = bu;
   if (ignored[0]) {
-    putlog(LOG_MISC, "*", "%s %s", USERF_IGNBANS, ignored);
+    putlog(LOG_MISC, "*", _("Ignored masks for channel(s): %s"), ignored);
   }
-  putlog(LOG_MISC, "*", "Userfile loaded, unpacking...");
+  putlog(LOG_MISC, "*", _("Userfile loaded, unpacking..."));
   for (u = bu; u; u = u->next) {
     struct user_entry *e;
 
     if (!(u->flags & USER_BOT) && !egg_strcasecmp(u->handle, botnetnick)) {
-      putlog(LOG_MISC, "*", "(!) I have a user record, but without +b");
+      putlog(LOG_MISC, "*", _("(!) I have a user record, but without +b"));
       /* u->flags |= USER_BOT; */
     }
 
@@ -1068,18 +1075,16 @@
 
           i = nextbot(u->handle);
           if ((i >= 0) && !egg_strcasecmp(dcc[i].nick, u->handle)) {
-            char *p = MISC_REJECTED;
-
             /* we're directly connected to the offending bot?! (shudder!) */
-            putlog(LOG_BOTS, "*", "%s %s", BOT_REJECTING, dcc[i].nick);
-            chatout("*** %s bot %s\n", p, dcc[i].nick);
-            botnet_send_unlinked(i, dcc[i].nick, p);
-            dprintf(i, "bye %s\n", BOT_REJECTING);
+            putlog(LOG_BOTS, "*", _("Rejecting bot %s"), dcc[i].nick);
+            chatout("*** rejected bot %s\n", dcc[i].nick);
+            botnet_send_unlinked(i, dcc[i].nick, "rejected");
+            dprintf(i, "bye %s\n", _("Rejecting bot"));
             killsock(dcc[i].sock);
             lostdcc(i);
           } else if ((i < 0) && egg_strcasecmp(botnetnick, u->handle)) {
             /* The bot is not connected, but listed in our tandem list! */
-            putlog(LOG_BOTS, "*", "(!) BUG: rejecting not connected bot %s!",
+            putlog(LOG_BOTS, "*", _("(!) BUG: rejecting not connected bot %s!"),
                    u->handle);
             rembot(u->handle);
           }
----------------------- End of diff -----------------------


More information about the Changes mailing list