[srvx-commits] CVS: services/src nickserv.c,1.216,1.217
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-11-22 04:10:38
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv1176/src
Modified Files:
nickserv.c
Log Message:
tell users with bad hostmasks but email set about authcookie
be clearer about following the discrim limit
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.216
retrieving revision 1.217
diff -C2 -r1.216 -r1.217
*** nickserv.c 12 Nov 2002 02:28:41 -0000 1.216
--- nickserv.c 22 Nov 2002 04:10:32 -0000 1.217
***************
*** 123,134 ****
#define NSMSG_EMAIL_SAME "That is the email address already there; no need to change it."
#define NSMSG_EMAIL_CHANGED "You have successfully changed your email address."
! #define NSMSG_BAD_COOKIE_TYPE "Your account had bad cookie type %d; sorry. I'm confused. Please report this bug."
#define NSMSG_MUST_TIME_OUT "You must wait for cookies of that type to time out."
#define NSMSG_ATE_COOKIE "I ate the cookie for your account. You may now have another."
! #define NSMSG_USE_RENAME "You're already authenticated to account $b%s$b -- contact the support staff to rename your account."
#define NSMSG_REGISTER_BAD_NICKMASK "Could not recognize $b%s$b as either a current nick or a hostmask."
! #define NSMSG_NICK_NOT_REGISTERED "Nick $b%s$b hasn't been registered to any account."
! #define NSMSG_HANDLE_NOT_FOUND "Couldn't find your account -- did you register yet?"
#define NSMSG_ALREADY_AUTHED "You are already authed to account $b%s$b; you must reconnect to auth to a different account."
#define NSMSG_HOSTMASK_INVALID "Your hostmask is not valid for account $b%s$b."
#define NSMSG_USER_IS_SERVICE "$b%s$b is a network service; you can only use that command on real users."
--- 123,135 ----
#define NSMSG_EMAIL_SAME "That is the email address already there; no need to change it."
#define NSMSG_EMAIL_CHANGED "You have successfully changed your email address."
! #define NSMSG_BAD_COOKIE_TYPE "Your account had bad cookie type %d; sorry. I am confused. Please report this bug."
#define NSMSG_MUST_TIME_OUT "You must wait for cookies of that type to time out."
#define NSMSG_ATE_COOKIE "I ate the cookie for your account. You may now have another."
! #define NSMSG_USE_RENAME "You are already authenticated to account $b%s$b -- contact the support staff to rename your account."
#define NSMSG_REGISTER_BAD_NICKMASK "Could not recognize $b%s$b as either a current nick or a hostmask."
! #define NSMSG_NICK_NOT_REGISTERED "Nick $b%s$b has not been registered to any account."
! #define NSMSG_HANDLE_NOT_FOUND "Could not find your account -- did you register yet?"
#define NSMSG_ALREADY_AUTHED "You are already authed to account $b%s$b; you must reconnect to auth to a different account."
+ #define NSMSG_USE_AUTHCOOKIE "Your hostmask is not valid for account $b%s$b. Please use the $bauthcookie$b command to grant yourself access. (/msg $S authcookie %s)"
#define NSMSG_HOSTMASK_INVALID "Your hostmask is not valid for account $b%s$b."
#define NSMSG_USER_IS_SERVICE "$b%s$b is a network service; you can only use that command on real users."
***************
*** 177,182 ****
#define NSMSG_USE_CMD_PASS "Please use the PASS command to change your password."
#define NSMSG_UNKNOWN_NICK "I know nothing about nick $b%s$b."
! #define NSMSG_NOT_YOUR_NICK "$b%s$b Is Nacho Nick."
! #define NSMSG_NICK_USER_YOU "I won't kill you."
#define NSMSG_UNREGNICK_SUCCESS "Nick $b%s$b has been unregistered."
#define NSMSG_UNREGISTER_SUCCESS "Account $b%s$b has been unregistered."
--- 178,183 ----
#define NSMSG_USE_CMD_PASS "Please use the PASS command to change your password."
#define NSMSG_UNKNOWN_NICK "I know nothing about nick $b%s$b."
! #define NSMSG_NOT_YOUR_NICK "The nick $b%s$b is not registered to you."
! #define NSMSG_NICK_USER_YOU "I will not let you kill yourself."
#define NSMSG_UNREGNICK_SUCCESS "Nick $b%s$b has been unregistered."
#define NSMSG_UNREGISTER_SUCCESS "Account $b%s$b has been unregistered."
***************
*** 1380,1384 ****
res = valid_user_for(user, hi);
if (!res) {
! nickserv_notice(user, NSMSG_HOSTMASK_INVALID, hi->handle);
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
--- 1381,1389 ----
res = valid_user_for(user, hi);
if (!res) {
! if (hi->email_addr && nickserv_conf.email_enabled) {
! reply(NSMSG_USE_AUTHCOOKIE, hi->handle, hi->handle);
! } else {
! reply(NSMSG_HOSTMASK_INVALID, hi->handle);
! }
log(NS_LOG, LOG_OTHER, IDENT_FORMAT" did not have a matching host for account '%s'.\n", IDENT_DATA(user), hi->handle);
return 0;
***************
*** 2703,2716 ****
{
dict_iterator_t it, next;
! unsigned int matched = 0;
! for (it=dict_first(nickserv_handle_dict); it; it=next) {
next = iter_next(it);
if (nickserv_discrim_match(discrim, iter_data(it))) {
dsf(source, iter_data(it));
matched++;
- if(matched >= discrim->limit) {
- return matched;
- }
}
}
--- 2708,2720 ----
{
dict_iterator_t it, next;
! unsigned int matched;
! for (it = dict_first(nickserv_handle_dict), matched = 0;
! it && (matched < discrim->limit);
! it = next) {
next = iter_next(it);
if (nickserv_discrim_match(discrim, iter_data(it))) {
dsf(source, iter_data(it));
matched++;
}
}
|