diff -r c97473b39a5c src/s_serv.c
--- a/src/s_serv.c	sáb may 25 11:28:52 2013 +0000
+++ b/src/s_serv.c	jue may 30 11:34:58 2013 +0200
@@ -626,14 +626,18 @@
 	if ((parc < 3) || BadPtr(parv[2])) {
 		/* If the argument starts with a '-' (like -motd, -opermotd, etc) then it's
 		 * assumed not to be a server. -- Syzop
+		 * Ugly hack: If a wildcard is found don't hunt server -- Punker
 		 */
-		if (parv[1] && (parv[1][0] == '-'))
+		if (parv[1] && ((parv[1][0] == '-') || strchr(parv[1], '*')))
 			x = HUNTED_ISME;
 		else
-			x = hunt_server(cptr, sptr, ":%s REHASH :%s", 1, parc, parv);
+			x = hunt_server(cptr, sptr, ":%s REHASH %s", 1, parc, parv);
 	} else {
-		if (!_match("-glob*", parv[1])) /* This is really ugly... hack to make /rehash -global -something work */
+		/* This is really ugly... hack to make /rehash <mask> -something work */
+		if (strchr(parv[1], '*'))
+		{
 			x = HUNTED_ISME;
+		}
 		else
 			x = hunt_server(cptr, sptr, ":%s REHASH %s :%s", 1, parc, parv);
 	}
@@ -669,41 +673,49 @@
 		/* Ok this is in an 'else' because it should be only executed for sptr == cptr,
 		 * but it's totally unrelated to the above ;).
 		 */
-		if (parv[1] && !_match("-glob*", parv[1]))
+		if (parv[1] && !match_esc("*\\**", parv[1]))
 		{
-			/* /REHASH -global [options] */
+			/* /REHASH <mask> [options] -- with wildcards */
+			char *t = parv[1];
+			bool me_rehash = false;
 			aClient *acptr;
-			
 			/* Shift parv's to the left */
 			parv[1] = parv[2];
 			parv[2] = NULL;
 			parc--;
-			/* Only netadmins may use /REHASH -global, which is because:
+			/* Only netadmins may use /REHASH *, which is because:
 			 * a) it makes sense
 			 * b) remote servers don't support remote rehashes by non-netadmins
 			 */
 			if (!IsNetAdmin(sptr))
 			{
 				sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]);
-				sendnotice(sptr, "'/REHASH -global' requires you to be NetAdmin");
+				sendnotice(sptr, "'/REHASH *' requires you to be NetAdmin");
 				return 0;
 			}
 			if (parv[1] && *parv[1] != '-')
 			{
-				sendnotice(sptr, "You cannot specify a server name after /REHASH -global, for obvious reasons");
+				sendnotice(sptr, "You cannot specify a server name after /REHASH *, for obvious reasons");
 				return 0;
 			}
+
 			/* Broadcast it in an inefficient, but backwards compatible way. */
 			list_for_each_entry(acptr, &global_server_list, client_node)
 			{
-				if (acptr == &me)
+				if (acptr == &me) {
+					if (!_match(t, acptr->name))
+						me_rehash = true;
 					continue;
-				sendto_one(acptr, ":%s REHASH %s %s",
-					sptr->name,
-					acptr->name,
-					parv[1] ? parv[1] : "-all");
+				}
+				else if (!_match(t, acptr->name))
+					sendto_one(acptr, ":%s REHASH %s %s",
+						sptr->name,
+						acptr->name,
+						parv[1] ? parv[1] : "-all");
 			}
-			/* Don't return, continue, because we need to REHASH ourselves as well. */
+			/* Return if we don't need to REHASH ourselves as well. */
+			if (!me_rehash)
+				return 0;
 		}
 	}
 

