[ekg2-commit] ekg2: jogger.c (HEAD) messages.c (HEAD) [peres]

CVS commit cvs w toxygen.net
Sob, 5 Maj 2007, 00:29:16 CEST


Module name:	ekg2
Changes by:	peres	2007-05-05 00:29:14

Modified files:
	jogger.c messages.c

Log message:
Enabling URL-in-nickname, as dj fixed slash-issue.

Index: jogger.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jogger/jogger.c,v
diff -d -u -r1.5 -r1.6
--- jogger.c	4 May 2007 15:55:16 -0000	1.5
+++ jogger.c	4 May 2007 22:29:14 -0000	1.6
@@ -179,9 +179,7 @@
 	format_add("jogger_subscription_denied", _("%! (%1) Subscription denied because of no permission."), 1);
 	format_add("jogger_unsubscribed_earlier", _("%> (%1) The thread weren't subscribed."), 1);
 	format_add("jogger_comment_added", _("%)%| (%1) Your comment was added to entry %c%2%n."), 1);
-
 	format_add("jogger_modified", _("%>%| (%1) Subscribed entry has been modified: %c%2%n."), 1);
-
 	format_add("jogger_published", _("%)%| (%1) Your new entry has been published as: %c%2%n."), 1);
 #endif
 	return 0;

Index: messages.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jogger/messages.c,v
diff -d -u -r1.8 -r1.9
--- messages.c	4 May 2007 17:23:38 -0000	1.8
+++ messages.c	4 May 2007 22:29:14 -0000	1.9
@@ -141,9 +141,10 @@
 			char **rcpts	= NULL;
 			uint32_t *fmt	= NULL;
 			
-			if (found == 4)
+			if (found == 4) {
 				lmsg	= xstrdup(msg+xstrlen(jogger_text[12])+1);
-			else {
+				url	= xstrndup(lmsg, tmp-msg-xstrlen(jogger_text[12])-1);
+			} else {
 				url	= msg+xstrlen(found == 3 ? owncf : jogger_text[found-1])+1;
 
 				if (!(lmsg = xstrchr(tmp, '\n')) || !(lmsg = xstrchr(lmsg+1, '\n')))
@@ -159,8 +160,7 @@
 				uid	= xstrdup("jogger:");
 			suid		= xstrdup(session_uid_get(js));
 
-			if (found != 4) {
-#if 0 /* next ekg2 bug - infinite loop if nickname contains slash */
+			{
 				userlist_t *u = userlist_find(js, uid);
 				
 				if (!u)
@@ -169,7 +169,6 @@
 					xfree(u->nickname);
 					u->nickname = url;
 				} else
-#endif
 					xfree(url);
 			}
 


Więcej informacji o liście dyskusyjnej ekg2-commit