Thread: [srvx-commits] CVS: services/src nickserv.c,1.203,1.204
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-09-11 02:01:04
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv14795/src
Modified Files:
nickserv.c
Log Message:
add more nick ownership enforcement options
Index: nickserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/nickserv.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -C2 -r1.203 -r1.204
*** nickserv.c 8 Sep 2002 21:46:04 -0000 1.203
--- nickserv.c 11 Sep 2002 02:01:01 -0000 1.204
***************
*** 65,70 ****
#define KEY_EMAIL_REQUIRED "email_required"
#define KEY_COOKIE_TIMEOUT "cookie_timeout"
- #define KEY_WARN_NICK_OWNED "warn_nick_owned"
- #define KEY_ENABLE_GHOST "enable_ghost"
#define KEY_ACCOUNTS_PER_EMAIL "accounts_per_email"
--- 65,68 ----
***************
*** 127,135 ****
#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 the 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 the 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."
--- 125,133 ----
#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."
***************
*** 148,152 ****
#define NSMSG_HANDLEINFO_CHANNELS " Channel(s): %s"
#define NSMSG_HANDLEINFO_CURRENT " Current nickname(s): %s"
! #define NSMSG_USERINFO_AUTHED_AS "$b%s$b is authenticated to the account $b%s$b."
#define NSMSG_USERINFO_NOT_AUTHED "$b%s$b is not authenticated to any account."
#define NSMSG_NICKINFO_OWNER "Nick $b%s$b is owned by account $b%s$b."
--- 146,150 ----
#define NSMSG_HANDLEINFO_CHANNELS " Channel(s): %s"
#define NSMSG_HANDLEINFO_CURRENT " Current nickname(s): %s"
! #define NSMSG_USERINFO_AUTHED_AS "$b%s$b is authenticated to account $b%s$b."
#define NSMSG_USERINFO_NOT_AUTHED "$b%s$b is not authenticated to any account."
#define NSMSG_NICKINFO_OWNER "Nick $b%s$b is owned by account $b%s$b."
***************
*** 156,163 ****
#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 the account $b%s$b."
! #define NSMSG_AUTH_ALLOWED_MSG "You may now authenticate to the account $b%s$b by typing $b/msg $N@$s auth %s password$b (using your password). If you will be using this computer regularly, please type $b/msg $N addmask$b (AFTER you auth) to permanently add your hostmask."
#define NSMSG_AUTH_ALLOWED_EMAIL "You may also (after you auth) type $b/msg $N set email us...@yo...$b to set an email address. This will let you use the $bauthcookie$b command to be authenticated in the future."
! #define NSMSG_AUTH_NORMAL_ONLY "User $b%s$b may now only authenticate to the accounts with matching hostmasks."
#define NSMSG_AUTH_UNSPECIAL "User $b%s$b did not have any special auth allowance."
#define NSMSG_MUST_AUTH "You must be authenticated first."
--- 154,161 ----
#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."
! #define NSMSG_AUTH_ALLOWED_MSG "You may now authenticate to account $b%s$b by typing $b/msg $N@$s auth %s password$b (using your password). If you will be using this computer regularly, please type $b/msg $N addmask$b (AFTER you auth) to permanently add your hostmask."
#define NSMSG_AUTH_ALLOWED_EMAIL "You may also (after you auth) type $b/msg $N set email us...@yo...$b to set an email address. This will let you use the $bauthcookie$b command to be authenticated in the future."
! #define NSMSG_AUTH_NORMAL_ONLY "User $b%s$b may now only authenticate to accounts with matching hostmasks."
#define NSMSG_AUTH_UNSPECIAL "User $b%s$b did not have any special auth allowance."
#define NSMSG_MUST_AUTH "You must be authenticated first."
***************
*** 167,171 ****
#define NSMSG_NICK_IN_USE "Nick $b%s$b is already in use."
#define NSMSG_REGNICK_SUCCESS "Nick $b%s$b has been registered to you."
! #define NSMSG_OREGNICK_SUCCESS "Nick $b%s$b has been registered to the account $b%s$b."
#define NSMSG_PASS_SUCCESS "Password changed."
#define NSMSG_MASK_INVALID "$b%s$b is an invalid hostmask."
--- 165,169 ----
#define NSMSG_NICK_IN_USE "Nick $b%s$b is already in use."
#define NSMSG_REGNICK_SUCCESS "Nick $b%s$b has been registered to you."
! #define NSMSG_OREGNICK_SUCCESS "Nick $b%s$b has been registered to account $b%s$b."
#define NSMSG_PASS_SUCCESS "Password changed."
#define NSMSG_MASK_INVALID "$b%s$b is an invalid hostmask."
***************
*** 177,187 ****
#define NSMSG_OPSERV_LEVEL_BAD "You may not promote another oper above your level."
#define NSMSG_USE_CMD_PASS "Please use the PASS command to change your password."
- #define NSMSG_KILL_MESSAGE "Nick owner requested kill."
- #define NSMSG_MULTI_KILL "Issued %d kills."
#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_INACTIVE "Couldn't find anyone using nick $b%s$b."
#define NSMSG_NICK_USER_YOU "I won't kill you."
- #define NSMSG_SINGLE_KILL "Issued kill for $b%s$b."
#define NSMSG_UNREGNICK_SUCCESS "Nick $b%s$b has been unregistered."
#define NSMSG_UNREGISTER_SUCCESS "Account $b%s$b has been unregistered."
--- 175,181 ----
***************
*** 213,217 ****
#define NSMSG_HANDLES_MERGED "Merged account $b%s$b into $b%s$b."
#define NSMSG_HANDLES_MERGED_G "%s (%s) merged account %s into %s."
! #define NSMSG_NICK_OWNED "%s is a registered nick - you must auth to the account %s or change your nick, or the owner may disconnect you."
#define NSMSG_SETTING_LIST "$b$N account settings:$b"
--- 207,216 ----
#define NSMSG_HANDLES_MERGED "Merged account $b%s$b into $b%s$b."
#define NSMSG_HANDLES_MERGED_G "%s (%s) merged account %s into %s."
! #define NSMSG_RECLAIM_WARN "%s is a registered nick - you must auth to account %s or change your nick."
! #define NSMSG_RECLAIM_KILL "Unauthenticated user of nick."
! #define NSMSG_RECLAIMED_NONE "You cannot manually reclaim a nick."
! #define NSMSG_RECLAIMED_WARN "Sent a request for %s to change their nick."
! #define NSMSG_RECLAIMED_SVSNICK "Forcibly changed %s's nick."
! #define NSMSG_RECLAIMED_KILL "Disconnected %s from the network."
#define NSMSG_SETTING_LIST "$b$N account settings:$b"
***************
*** 253,256 ****
--- 252,264 ----
static unsigned int flag_access_levels[32];
+ enum reclaim_action {
+ RECLAIM_NONE,
+ RECLAIM_WARN,
+ RECLAIM_SVSNICK,
+ RECLAIM_KILL
+ };
+ static void nickserv_reclaim(struct userNode *user, struct nick_info *ni, enum reclaim_action action);
+ static void nickserv_reclaim_p(void *data);
+
static struct {
unsigned int disable_nicks : 1;
***************
*** 260,266 ****
unsigned int email_enabled : 1;
unsigned int email_required : 1;
- unsigned int warn_nick_owned : 1;
- unsigned int enable_ghost : 1;
unsigned int default_hostmask : 1;
unsigned long nicks_per_handle;
unsigned long password_min_length;
--- 268,273 ----
unsigned int email_enabled : 1;
unsigned int email_required : 1;
unsigned int default_hostmask : 1;
+ unsigned int warn_nick_owned : 1;
unsigned long nicks_per_handle;
unsigned long password_min_length;
***************
*** 283,286 ****
--- 290,296 ----
dict_t weak_password_dict;
struct policer_params *auth_policer_params;
+ enum reclaim_action reclaim_action;
+ enum reclaim_action auto_reclaim_action;
+ unsigned long auto_reclaim_delay;
} nickserv_conf;
***************
*** 755,758 ****
--- 765,770 ----
for (n=0; n<auth_func_used; n++) auth_func_list[n](user, old_info);
if (hi) {
+ struct nick_info *ni;
+
HANDLE_CLEAR_FLAG(hi, FROZEN);
snprintf(hi->last_authed_host, sizeof(hi->last_authed_host), "%s@%s", user->ident, user->hostname);
***************
*** 773,776 ****
--- 785,792 ----
StampUser(user, id);
}
+
+ if ((ni = get_nick_info(user->nick)) && (ni->owner == hi)) {
+ timeq_del(0, nickserv_reclaim_p, user, TIMEQ_IGNORE_WHEN);
+ }
} else {
/* We cannot clear the user's account ID, unfortunately. */
***************
*** 874,878 ****
nickserv_notice(user, NSMSG_USE_COOKIE_EMAIL_2);
snprintf(subject, sizeof(subject), "Email address change verification for %s", netname);
! snprintf(body, sizeof(body), "This email has been sent to verify that your email address belongs to the same person as the account %s on %s. The SECOND HALF of your cookie is:\n %.*s\nTo verify your address as associated with this account, log on to %s and type the following command:\n /msg %s@%s COOKIE %s ?????%.*s\n(Replace the ????? with the FIRST HALF of the cookie, as sent to your OLD email address.)\nIf you did NOT request this email address to be associated with this account, you do not need to do anything. Please contact the %s staff if you have questions.", hi->handle, netname, COOKIELEN/2, cookie->cookie+COOKIELEN/2, netname, nickserv->nick, self->name, hi->handle, COOKIELEN/2, cookie->cookie+COOKIELEN/2, netname);
sendmail(nickserv, hi, subject, body, 1);
snprintf(subject, sizeof(subject), "Email address change verification for %s", netname);
--- 890,894 ----
nickserv_notice(user, NSMSG_USE_COOKIE_EMAIL_2);
snprintf(subject, sizeof(subject), "Email address change verification for %s", netname);
! snprintf(body, sizeof(body), "This email has been sent to verify that your email address belongs to the same person as account %s on %s. The SECOND HALF of your cookie is:\n %.*s\nTo verify your address as associated with this account, log on to %s and type the following command:\n /msg %s@%s COOKIE %s ?????%.*s\n(Replace the ????? with the FIRST HALF of the cookie, as sent to your OLD email address.)\nIf you did NOT request this email address to be associated with this account, you do not need to do anything. Please contact the %s staff if you have questions.", hi->handle, netname, COOKIELEN/2, cookie->cookie+COOKIELEN/2, netname, nickserv->nick, self->name, hi->handle, COOKIELEN/2, cookie->cookie+COOKIELEN/2, netname);
sendmail(nickserv, hi, subject, body, 1);
snprintf(subject, sizeof(subject), "Email address change verification for %s", netname);
***************
*** 889,893 ****
case ALLOWAUTH:
snprintf(subject, sizeof(subject), "Authentication allowed for %s", netname);
! snprintf(body, sizeof(body), "This email has been sent to let you authenticate (auth) to the account %s on %s. Your cookie is:\n %s\nTo auth to that account, log on to %s and type the following command:\n /msg %s@%s COOKIE %s %s\nIf you did NOT request this authorization, you do not need to do anything. Please contact the %s staff if you have questions.", hi->handle, netname, cookie->cookie, netname, nickserv->nick, self->name, hi->handle, cookie->cookie, netname);
break;
default:
--- 905,909 ----
case ALLOWAUTH:
snprintf(subject, sizeof(subject), "Authentication allowed for %s", netname);
! snprintf(body, sizeof(body), "This email has been sent to let you authenticate (auth) to account %s on %s. Your cookie is:\n %s\nTo auth to that account, log on to %s and type the following command:\n /msg %s@%s COOKIE %s %s\nIf you did NOT request this authorization, you do not need to do anything. Please contact the %s staff if you have questions.", hi->handle, netname, cookie->cookie, netname, nickserv->nick, self->name, hi->handle, cookie->cookie, netname);
break;
default:
***************
*** 2085,2089 ****
}
! static NICKSERV_FUNC(cmd_kill)
{
struct handle_info *hi;
--- 2101,2105 ----
}
! static NICKSERV_FUNC(cmd_reclaim)
{
struct handle_info *hi;
***************
*** 2091,2130 ****
struct userNode *victim;
hi = user->handle_info;
! if (argc < 2) {
! unsigned int count = 0;
! /* if they didn't give any names, try killing indiscriminately */
! for (ni=hi->nicks; ni; ni=ni->next) {
! victim = GetUserH(ni->nick);
! /* don't kill nicks who don't exist, or who are the sender */
! if (!victim || (victim == user)) continue;
! DelUser(victim, nickserv, true, NSMSG_KILL_MESSAGE);
! count++;
! }
! nickserv_notice(user, NSMSG_MULTI_KILL, count);
! } else {
! unsigned int i;
! for (i=1; i<argc; i++) {
! ni = dict_find(nickserv_nick_dict, argv[i], 0);
! if (!ni) {
! nickserv_notice(user, NSMSG_UNKNOWN_NICK, argv[i]);
! continue;
! }
! if (ni->owner != user->handle_info) {
! nickserv_notice(user, NSMSG_NOT_YOUR_NICK, argv[i]);
! continue;
! }
! victim = GetUserH(argv[i]);
! if (!victim) {
! nickserv_notice(user, NSMSG_NICK_INACTIVE, argv[i]);
! continue;
! }
! if (victim == user) {
! nickserv_notice(user, NSMSG_NICK_USER_YOU);
! continue;
! }
! DelUser(victim, nickserv, true, NSMSG_KILL_MESSAGE);
! nickserv_notice(user, NSMSG_SINGLE_KILL, argv[i]);
! }
}
return 1;
--- 2107,2136 ----
struct userNode *victim;
+ NICKSERV_MIN_PARMS(2);
hi = user->handle_info;
! ni = dict_find(nickserv_nick_dict, argv[1], 0);
! if (!ni) {
! reply(NSMSG_UNKNOWN_NICK, argv[1]);
! return 0;
! }
! if (ni->owner != user->handle_info) {
! reply(NSMSG_NOT_YOUR_NICK, ni->nick);
! return 0;
! }
! victim = GetUserH(ni->nick);
! if (!victim) {
! reply(MSG_NICK_UNKNOWN, ni->nick);
! return 0;
! }
! if (victim == user) {
! reply(NSMSG_NICK_USER_YOU);
! return 0;
! }
! nickserv_reclaim(victim, ni, nickserv_conf.reclaim_action);
! switch (nickserv_conf.reclaim_action) {
! case RECLAIM_NONE: reply(NSMSG_RECLAIMED_NONE); break;
! case RECLAIM_WARN: reply(NSMSG_RECLAIMED_WARN, victim->nick); break;
! case RECLAIM_SVSNICK: reply(NSMSG_RECLAIMED_SVSNICK, victim->nick); break;
! case RECLAIM_KILL: reply(NSMSG_RECLAIMED_KILL, victim->nick); break;
}
return 1;
***************
*** 2893,2896 ****
--- 2899,2911 ----
}
+ static enum reclaim_action
+ reclaim_action_from_string(const char *str) {
+ if (!str) return RECLAIM_NONE;
+ else if (!irccasecmp(str, "warn")) return RECLAIM_WARN;
+ else if (!irccasecmp(str, "svsnick")) return RECLAIM_SVSNICK;
+ else if (!irccasecmp(str, "kill")) return RECLAIM_KILL;
+ else return RECLAIM_NONE;
+ }
+
static void
nickserv_conf_read(void)
***************
*** 2954,2961 ****
if (!str) str = database_get_data(conf_node, KEY_NOCHAN_ACCOUNT_EXPIRE_DELAY, RECDB_QSTRING);
nickserv_conf.nochan_handle_expire_delay = str ? ParseInterval(str) : 86400*15;
! str = database_get_data(conf_node, KEY_WARN_NICK_OWNED, RECDB_QSTRING);
! nickserv_conf.warn_nick_owned = str ? enabled_string(str) : 0;
! str = database_get_data(conf_node, KEY_ENABLE_GHOST, RECDB_QSTRING);
! nickserv_conf.enable_ghost = str ? enabled_string(str) : 0;
child = database_get_data(conf_node, KEY_FLAG_LEVELS, RECDB_OBJECT);
for (it=dict_first(child); it; it=iter_next(it)) {
--- 2969,2982 ----
if (!str) str = database_get_data(conf_node, KEY_NOCHAN_ACCOUNT_EXPIRE_DELAY, RECDB_QSTRING);
nickserv_conf.nochan_handle_expire_delay = str ? ParseInterval(str) : 86400*15;
! if (!nickserv_conf.disable_nicks) {
! str = database_get_data(conf_node, "reclaim_action", RECDB_QSTRING);
! nickserv_conf.reclaim_action = str ? reclaim_action_from_string(str) : RECLAIM_NONE;
! str = database_get_data(conf_node, "warn_nick_owned", RECDB_QSTRING);
! nickserv_conf.warn_nick_owned = str ? enabled_string(str) : 0;
! str = database_get_data(conf_node, "auto_reclaim_action", RECDB_QSTRING);
! nickserv_conf.auto_reclaim_action = str ? reclaim_action_from_string(str) : RECLAIM_NONE;
! str = database_get_data(conf_node, "auto_reclaim_delay", RECDB_QSTRING);
! nickserv_conf.auto_reclaim_delay = str ? ParseInterval(str) : 0;
! }
child = database_get_data(conf_node, KEY_FLAG_LEVELS, RECDB_OBJECT);
for (it=dict_first(child); it; it=iter_next(it)) {
***************
*** 2964,2974 ****
int pos;
! if (!strncasecmp(key, "uc_", 3)) {
! flag = toupper(key[3]);
! } else if (!strncasecmp(key, "lc_", 3)) {
! flag = tolower(key[3]);
! } else {
! flag = key[0];
! }
if ((pos = handle_inverse_flags[flag])) {
--- 2985,2991 ----
int pos;
! if (!strncasecmp(key, "uc_", 3)) flag = toupper(key[3]);
! else if (!strncasecmp(key, "lc_", 3)) flag = tolower(key[3]);
! else flag = key[0];
if ((pos = handle_inverse_flags[flag])) {
***************
*** 3013,3028 ****
}
! int
! handle_new_user(struct userNode *user)
! {
struct nick_info *ni;
! if (nickserv_conf.warn_nick_owned
! && (ni = get_nick_info(user->nick))
! && (user->handle_info != ni->owner)) {
! nickserv_notice(user, NSMSG_NICK_OWNED, ni->nick, ni->owner->handle);
}
return 0;
}
void
handle_account(struct userNode *user, char *stamp)
--- 3030,3087 ----
}
! static void
! nickserv_reclaim(struct userNode *user, struct nick_info *ni, enum reclaim_action action) {
! char newnick[NICKLEN+1];
!
! assert(user);
! assert(ni);
! switch (action) {
! case RECLAIM_NONE:
! /* do nothing */
! break;
! case RECLAIM_WARN:
! send_message(user, nickserv, NSMSG_RECLAIM_WARN, ni->nick, ni->owner->handle);
! break;
! case RECLAIM_SVSNICK:
! do {
! snprintf(newnick, sizeof(newnick), "Guest%d", rand()%10000);
! } while (GetUserH(newnick));
! irc_svsnick(nickserv, user, newnick);
! break;
! case RECLAIM_KILL:
! irc_kill(nickserv, user, NSMSG_RECLAIM_KILL);
! break;
! }
! }
!
! static void
! nickserv_reclaim_p(void *data) {
! struct userNode *user = data;
! struct nick_info *ni = get_nick_info(user->nick);
! if (ni) nickserv_reclaim(user, ni, nickserv_conf.auto_reclaim_action);
! }
!
! static int
! check_user_nick(struct userNode *user, const char *nick) {
struct nick_info *ni;
! if (!(ni = get_nick_info(nick)) || (user->handle_info == ni->owner)) return 0;
! if (nickserv_conf.warn_nick_owned) {
! send_message(user, nickserv, NSMSG_RECLAIM_WARN, ni->nick, ni->owner->handle);
! }
! if (nickserv_conf.auto_reclaim_action == RECLAIM_NONE) return 0;
! if (nickserv_conf.auto_reclaim_delay) {
! timeq_add(now + nickserv_conf.auto_reclaim_delay, nickserv_reclaim_p, user);
! } else {
! nickserv_reclaim(user, ni, nickserv_conf.auto_reclaim_action);
}
return 0;
}
+ int
+ handle_new_user(struct userNode *user)
+ {
+ return check_user_nick(user, user->nick);
+ }
+
void
handle_account(struct userNode *user, char *stamp)
***************
*** 3062,3066 ****
handle_nick_change(struct userNode *user, const char *new_nick)
{
- struct nick_info *ni;
struct handle_info *hi;
if ((hi = dict_find(nickserv_allow_auth_dict, user->nick, 0))) {
--- 3121,3124 ----
***************
*** 3069,3078 ****
dict_insert(nickserv_allow_auth_dict, new_nick, hi);
}
! if (nickserv_conf.warn_nick_owned
! && (ni = get_nick_info(new_nick))
! && (user->handle_info != ni->owner)) {
! /* Send the user a warning that it's already registered. */
! nickserv_notice(user, NSMSG_NICK_OWNED, ni->nick, ni->owner->handle);
! }
}
--- 3127,3132 ----
dict_insert(nickserv_allow_auth_dict, new_nick, hi);
}
! timeq_del(0, nickserv_reclaim_p, user, TIMEQ_IGNORE_WHEN);
! check_user_nick(user, new_nick);
}
***************
*** 3082,3085 ****
--- 3136,3140 ----
if (user->auth_policer) policer_delete(user->auth_policer);
dict_remove(nickserv_allow_auth_dict, user->nick);
+ timeq_del(0, nickserv_reclaim_p, user, TIMEQ_IGNORE_WHEN);
set_user_handle_info(user, NULL, 0);
}
***************
*** 3180,3184 ****
nickserv_define_func("OUNREGNICK", cmd_ounregnick, 0, 1, 0);
nickserv_define_func("NICKINFO", cmd_nickinfo, -1, 1, 0);
! nickserv_define_func("KILL", cmd_kill, -1, 1, 0);
}
if (nickserv_conf.email_enabled) {
--- 3235,3239 ----
nickserv_define_func("OUNREGNICK", cmd_ounregnick, 0, 1, 0);
nickserv_define_func("NICKINFO", cmd_nickinfo, -1, 1, 0);
! nickserv_define_func("RECLAIM", cmd_reclaim, -1, 1, 0);
}
if (nickserv_conf.email_enabled) {
***************
*** 3190,3196 ****
dict_insert(nickserv_opt_dict, "EMAIL", opt_email);
}
! if (nickserv_conf.enable_ghost) {
! modcmd_register(nickserv_module, "GHOST", cmd_ghost, 2, MODCMD_REQUIRE_AUTHED, "weight", "5.0", NULL);
! }
/* miscellaneous commands */
nickserv_define_func("STATUS", cmd_status, -1, 0, 0);
--- 3245,3249 ----
dict_insert(nickserv_opt_dict, "EMAIL", opt_email);
}
! modcmd_register(nickserv_module, "GHOST", cmd_ghost, 2, MODCMD_REQUIRE_AUTHED, "weight", "5.0", NULL);
/* miscellaneous commands */
nickserv_define_func("STATUS", cmd_status, -1, 0, 0);
|