{ "NSMSG_HANDLEINFO_INFOLINE", " Infoline: %s" },
{ "NSMSG_HANDLEINFO_DEVNULL", " DevNull Class: %s" },
{ "NSMSG_HANDLEINFO_WEBSITE", " Website: %s" },
+ { "NSMSG_HANDLEINFO_ACCESS", " Access: %i" },
{ "NSMSG_HANDLEINFO_FLAGS", " Flags: %s" },
{ "NSMSG_HANDLEINFO_EPITHET", " Epithet: %s" },
{ "NSMSG_HANDLEINFO_FAKEIDENT", " Fake ident: %s" },
unsigned int ii;
/* If no hostmasks on the account, allow it. */
- if (!hi->masks->used)
+ if (!hi->masks->used || IsDummy(user))
return 1;
/* If any hostmask matches, allow it. */
for (ii=0; ii<hi->masks->used; ii++)
reply("NSMSG_HANDLEINFO_DEVNULL", (hi->devnull ? hi->devnull : nsmsg_none));
if (user->handle_info && HANDLE_FLAGGED(user->handle_info, BOT))
reply("NSMSG_HANDLEINFO_WEBSITE", (hi->website ? hi->website : nsmsg_none));
+ if(hi->opserv_level > 0 && user->handle_info && HANDLE_FLAGGED(user->handle_info, BOT))
+ reply("NSMSG_HANDLEINFO_ACCESS", hi->opserv_level);
if (HANDLE_FLAGGED(hi, FROZEN))
reply("NSMSG_HANDLEINFO_VACATION");
return 1;
}
-struct handle_info *checklogin(const char *user, const char *pass, const char *numeric, const char *hostmask)
+struct handle_info *checklogin(const char *user, const char *pass, const char *numeric, const char *hostmask, const char *ipmask)
{
struct handle_info *hi;
+ unsigned int match = 0, ii = 0;
hi = dict_find(nickserv_handle_dict, user, NULL);
if(!hi)
return NULL;
+ /* If no hostmasks on the account, allow it. */
+ if (hi->masks->used) {
+ /* If any hostmask matches, allow it. */
+ for (ii=0; ii<hi->masks->used; ii++)
+ if (match_ircglob(hostmask, hi->masks->list[ii]) || match_ircglob(ipmask, hi->masks->list[ii])) {
+ match = 1;
+ break;
+ }
+ if(!match)
+ return NULL;
+ }
if(!checkpass(pass, hi->passwd))
return NULL;
if (HANDLE_FLAGGED(hi, SUSPENDED))