summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/servlist.c4
-rw-r--r--src/common/url.c20
2 files changed, 19 insertions, 5 deletions
diff --git a/src/common/servlist.c b/src/common/servlist.c
index e77c0409..00c1cc8e 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -492,9 +492,9 @@ static const struct defaultserver def[] =
 
 	{"Snoonet", 0},
 #ifdef USE_OPENSSL
-	{0,			"irc.snoonet.com/+6697"},
+	{0,			"irc.snoonet.org/+6697"},
 #endif
-	{0,			"irc.snoonet.com/6667"},
+	{0,			"irc.snoonet.org/6667"},
 
 	{"Sohbet.Net", 0},
 	{0,			"irc.sohbet.net"},
diff --git a/src/common/url.c b/src/common/url.c
index 89047511..c183a5c8 100644
--- a/src/common/url.c
+++ b/src/common/url.c
@@ -188,6 +188,16 @@ static int laststart = 0;
 static int lastend = 0;
 static int lasttype = 0;
 
+static int
+strchrs (char c, char *s)
+{
+	while (*s)
+		if (c == *s++)
+			return TRUE;
+	return FALSE;
+}
+
+#define NICKPRE "~+!@%%&"
 int
 url_check_word (const char *word)
 {
@@ -196,11 +206,15 @@ url_check_word (const char *word)
 	{
 		switch (lasttype)
 		{
+			char *str;
+
 			case WORD_NICK:
-				if (!isalnum (word[laststart]))
+				if (strchrs (word[laststart], NICKPRE))
 					laststart++;
-				if (!userlist_find (current_sess, &word[laststart]))
+				str = g_strndup (&word[laststart], lastend - laststart);
+				if (!userlist_find (current_sess, str))
 					lasttype = 0;
+				g_free (str);
 				return lasttype;
 			case WORD_EMAIL:
 				if (!isalnum (word[laststart]))
@@ -449,7 +463,7 @@ re_email (void)
 }
 
 /*	NICK description --- */
-#define NICKPRE "~+!@%%&"
+/* For NICKPRE see before url_check_word() */
 #define NICKHYP	"-"
 #define NICKLET "a-z"
 #define NICKDIG "0-9"