diff --git a/Changes b/Changes index 5734cccc8..0d13cd9c9 100644 --- a/Changes +++ b/Changes @@ -431,3 +431,6 @@ - Unreal will now prepend the pathname to the module and append the appropriate extension (.so or .dll) to the end) - The new module system version is "3.2.3" to allow for backwards compatibility +- Documented the default behavior of snomasks when /mode nick +s is used (#0002141) suggested + by Bugz. +- Added "const" to the functions in match.c, (#0002116) suggested by Xuefer. diff --git a/doc/unreal32docs.html b/doc/unreal32docs.html index f207274ad..f30cedc69 100644 --- a/doc/unreal32docs.html +++ b/doc/unreal32docs.html @@ -267,7 +267,8 @@ Windows:
[*: this snomask is also allowed to non-ircops]

You can control which snomasks you automatically get (set::snomask-on-connect) and which you get - on oper (set::snomask-on-oper, oper::snomask)

+ on oper (set::snomask-on-oper, oper::snomask)

+

By default, if a user simply sets mode +s, certain snomasks are set. For non-opers, snomasks +ks, and for opers, snomasks +kscfvGqo.

3.4 - Aliases

With aliases you can configure server-side alias commands. diff --git a/include/common.h b/include/common.h index 7131c34ba..f5cae75f7 100644 --- a/include/common.h +++ b/include/common.h @@ -96,12 +96,12 @@ void free(); #define TS time_t -extern int match(char *, char *); +extern int match(const char *, const char *); #define mycmp(a,b) \ ( (toupper(a[0])!=toupper(b[0])) || smycmp((a)+1,(b)+1) ) -extern int smycmp(char *, char *); +extern int smycmp(const char *, const char *); #ifndef GLIBC2_x -extern int myncmp(char *, char *, int); +extern int myncmp(const char *, const char *, int); #endif #ifdef NEED_STRTOK diff --git a/src/match.c b/src/match.c index 4d9b7bfe6..de1dea944 100644 --- a/src/match.c +++ b/src/match.c @@ -41,7 +41,7 @@ u_char touppertab[], tolowertab[]; * match() * written by binary */ -static inline int match2(char *mask, char *name) +static inline int match2(const char *mask, const char *name) { u_char *m; /* why didn't the old one use registers */ u_char *n; /* because registers suck -- codemastr */ @@ -230,7 +230,7 @@ char *collapse(char *pattern) * <0, if s1 lexicographically less than s2 * >0, if s1 lexicographically greater than s2 */ -int smycmp(char *s1, char *s2) +int smycmp(const char *s1, const char *s2) { u_char *str1; u_char *str2; @@ -250,7 +250,7 @@ int smycmp(char *s1, char *s2) } -int myncmp(char *str1, char *str2, int n) +int myncmp(const char *str1, const char *str2, int n) { u_char *s1; u_char *s2; @@ -411,13 +411,13 @@ u_char char_atribs[] = { }; /* Old match() */ -int _match(char *mask, char *name) { +int _match(const char *mask, const char *name) { return match2(mask,name); } /* Old match() plus some optimizations from bahamut */ -int match(char *mask, char *name) { +int match(const char *mask, const char *name) { if (mask[0] == '*' && mask[1] == '!') { mask += 2; while (*name != '!' && *name)