[srvx-commits] CVS: services/src nickserv.c,1.191,1.192
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-08-08 01:11:59
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv12744/src
Modified Files:
nickserv.c
Log Message:
Deauthenticate users when their accounts are suspended.
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -C2 -r1.191 -r1.192
*** nickserv.c 8 Aug 2002 01:05:20 -0000 1.191
--- nickserv.c 8 Aug 2002 01:11:56 -0000 1.192
***************
*** 155,159 ****
#define NSMSG_PLEASE_SET_EMAIL "We now require email addresses for users. Please use the $bset email$b command to set your email address!"
#define NSMSG_WEAK_PASSWORD "WARNING: You are using a password that is considered weak (easy to guess). It is STRONGLY recommended you change it (now, if not sooner) by typing \"/msg $N@$s PASS oldpass newpass\" (with your current password and a new password)."
! #define NSMSG_HANDLE_SUSPENDED "Your $N account has been suspended."
#define NSMSG_AUTH_SUCCESS "I recognize you."
#define NSMSG_AUTH_ALLOWED "User $b%s$b may now authenticate to account $b%s$b."
--- 155,159 ----
#define NSMSG_PLEASE_SET_EMAIL "We now require email addresses for users. Please use the $bset email$b command to set your email address!"
#define NSMSG_WEAK_PASSWORD "WARNING: You are using a password that is considered weak (easy to guess). It is STRONGLY recommended you change it (now, if not sooner) by typing \"/msg $N@$s PASS oldpass newpass\" (with your current password and a new password)."
! #define NSMSG_HANDLE_SUSPENDED "Your $b$N$b account has been suspended; you may not use it."
#define NSMSG_AUTH_SUCCESS "I recognize you."
#define NSMSG_AUTH_ALLOWED "User $b%s$b may now authenticate to account $b%s$b."
***************
*** 1737,1740 ****
--- 1737,1753 ----
}
if (!uNode) HANDLE_CLEAR_FLAG(hi, HELPING);
+ }
+
+ if (added & HI_FLAG_SUSPENDED) {
+ struct userNode *un, *next;
+
+ for (un = hi->users; un; un = next) {
+ next = un->next_authed;
+ un->handle_info = NULL;
+ un->next_authed = NULL;
+
+ nickserv_notice(un, NSMSG_HANDLE_SUSPENDED);
+ }
+ hi->users = NULL;
}
|