X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/2e9062b9f9b65c105a3e230a56752f1c5abed332..c0601d1e22c5c3749ea94c1c4359f9223b732fe4:/src/tools.c diff --git a/src/tools.c b/src/tools.c index f982272..357c1c7 100644 --- a/src/tools.c +++ b/src/tools.c @@ -367,6 +367,10 @@ irc_strtolower(char *str) { int irccasecmp(const char *stra, const char *strb) { + if (!stra) + return -1; + if (!strb) + return 1; while (*stra && (tolower(*stra) == tolower(*strb))) stra++, strb++; return tolower(*stra) - tolower(*strb); @@ -732,6 +736,8 @@ user_matches_glob(struct userNode *user, const char *orig_glob, int flags, int s return match_ircglob(user->hostname, glob); case 't': /* this is handled ircd side */ return match_ircglob(user->hostname, glob); + case 'R': /* this is handled ircd side */ + return match_ircglob(user->hostname, glob); default: return -1; }