mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-08 17:53:14 +02:00
Update hunt_server() so command is really the command (eg "LUSERS") and
not a format string (eg ":%s LUSERS %s"). It now simply concats all parv[]'s. That is, up to parc count. And it automatically does the :stuff for the last parameter if it contains spaces or starts with a : etc. This gets rid of a bit sketchy code with an arbitrary maximum etc. Now it's just: if (hunt_server(client, NULL, "REHASH", 1, parc, parv) != HUNTED_ISME) return; This has one side effect, though: Previously we used the format string, so it may be possible for S2S traffic to now have more arguments then before here and there. Eg: * It could be that the caller was using a format string to intentionally cut off an extra parameter at the end. You can still do that if you call with eg parc-1 instead of parc. I don't think there were any such cases though, but hard to rule out. * Extranous parameters may show up in S2S traffic where it was previously unexpected.
This commit is contained in:
+1
-1
@@ -326,7 +326,7 @@ extern char *make_nick_user_host(const char *, const char *, const char *);
|
||||
extern char *make_nick_user_host_r(char *namebuf, size_t namebuflen, const char *nick, const char *name, const char *host);
|
||||
extern char *make_user_host(const char *, const char *);
|
||||
extern void parse(Client *cptr, char *buffer, int length);
|
||||
extern int hunt_server(Client *, MessageTag *, char *, int, int, const char **);
|
||||
extern int hunt_server(Client *, MessageTag *, const char *, int, int, const char **);
|
||||
extern int cmd_server_estab(Client *);
|
||||
extern void umode_init(void);
|
||||
#define UMODE_GLOBAL 1
|
||||
|
||||
Reference in New Issue
Block a user