X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconf.c;h=41b5469a8140f4c5a07d1874dd6d048fcbf6ae3b;hp=16ad98c21a40c185cc5b371f387e0372a3ee2cbe;hb=a6dd2e33c2c9e60bbd286bb07a7a6273566dec7d;hpb=9d8974d5098e9426f9185f31b2b3853e55513f3e diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c index 16ad98c2..41b5469a 100644 --- a/src/ngircd/conf.c +++ b/src/ngircd/conf.c @@ -651,6 +651,27 @@ Conf_NickIsService(int ConfServer, const char *Nick) return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick); } +/** + * Check if the given nick name is blocked for "normal client" use. + * + * @param ConfServer The server index or NONE to check all configured servers. + * @param Nick The nick name to check. + * @returns true if the given nick name belongs to an "IRC service". + */ +GLOBAL bool +Conf_NickIsBlocked(const char *Nick) +{ + int i; + + for(i = 0; i < MAX_SERVERS; i++) { + if (!Conf_Server[i].name[0]) + continue; + if (Conf_NickIsService(i, Nick)) + return true; + } + return false; +} + /** * Initialize configuration settings with their default values. */