diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ms_cancel.c | 2 | ||||
-rw-r--r-- | src/core/ms_check.c | 2 | ||||
-rw-r--r-- | src/core/ns_group.c | 2 | ||||
-rw-r--r-- | src/core/ns_identify.c | 18 | ||||
-rw-r--r-- | src/core/ns_info.c | 3 | ||||
-rw-r--r-- | src/core/ns_logout.c | 4 | ||||
-rw-r--r-- | src/core/ns_register.c | 2 | ||||
-rw-r--r-- | src/core/ns_status.c | 2 | ||||
-rw-r--r-- | src/core/ns_suspend.c | 1 | ||||
-rw-r--r-- | src/core/ns_update.c | 1 |
10 files changed, 11 insertions, 26 deletions
diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c index e52b21651..94e18262b 100644 --- a/src/core/ms_cancel.c +++ b/src/core/ms_cancel.c @@ -31,7 +31,7 @@ class CommandMSCancel : public Command const char *name = params[0].c_str(); MemoInfo *mi; - if (!nick_recognized(u)) + if (!u->IsRecognized()) notice_lang(s_MemoServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ); else if (!(mi = getmemoinfo(name, &ischan, &isforbid))) { diff --git a/src/core/ms_check.c b/src/core/ms_check.c index 5b352deb1..ac48dac6d 100644 --- a/src/core/ms_check.c +++ b/src/core/ms_check.c @@ -31,7 +31,7 @@ class CommandMSCheck : public Command struct tm *tm; char timebuf[64]; - if (!nick_recognized(u)) + if (!u->IsRecognized()) { notice_lang(s_MemoServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ); return MOD_CONT; diff --git a/src/core/ns_group.c b/src/core/ns_group.c index ad25fc978..c3e458ed1 100644 --- a/src/core/ns_group.c +++ b/src/core/ns_group.c @@ -121,7 +121,6 @@ class CommandNSGroup : public Command sprintf(na->last_usermask, "%s@%s", u->GetIdent().c_str(), u->GetDisplayedHost().c_str()); na->last_realname = sstrdup(u->realname); na->time_registered = na->last_seen = time(NULL); - na->status = static_cast<int16>(NS_IDENTIFIED | NS_RECOGNIZED); u->nc = na->nc; @@ -243,6 +242,7 @@ NickAlias *makealias(const char *nick, NickCore *nc) na = new NickAlias; na->nick = sstrdup(nick); na->nc = nc; + na->status = 0; slist_add(&nc->aliases, na); alpha_insert_alias(na); return na; diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c index 4025acb16..9ae7f3a35 100644 --- a/src/core/ns_identify.c +++ b/src/core/ns_identify.c @@ -65,18 +65,10 @@ class CommandNSIdentify : public Command alog("%s: %s!%s@%s logged out of account %s", s_NickServ, u->nick, u->GetIdent().c_str(), u->host, u->nc->display); } - if (!(na->status & NS_IDENTIFIED) && !(na->status & NS_RECOGNIZED)) - { - if (na->last_usermask) - delete [] na->last_usermask; - na->last_usermask = new char[u->GetIdent().length() + u->GetDisplayedHost().length() + 2]; - sprintf(na->last_usermask, "%s@%s", u->GetIdent().c_str(), u->GetDisplayedHost().c_str()); - if (na->last_realname) - delete [] na->last_realname; - na->last_realname = sstrdup(u->realname); - } - - na->status |= NS_IDENTIFIED; + u->UpdateHost(); + if (na->last_realname) + delete [] na->last_realname; + na->last_realname = sstrdup(u->realname); na->last_seen = time(NULL); u->nc = na->nc; @@ -98,7 +90,7 @@ class CommandNSIdentify : public Command notice_help(s_NickServ, u, NICK_IDENTIFY_EMAIL_HOWTO); } - if (!(na->status & NS_RECOGNIZED)) + if (nick_identified(u)) check_memos(u); /* Clear any timers */ diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 114f6b2e2..3e241b787 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -85,7 +85,7 @@ class CommandNSInfo : public Command time_t expt; /* Is the real owner of the nick we're looking up online? -TheShadow */ - if (na->status & (NS_RECOGNIZED | NS_IDENTIFIED)) + if (finduser(na->nick)) nick_online = 1; /* Only show hidden fields to owner and sadmins and only when the ALL @@ -95,7 +95,6 @@ class CommandNSInfo : public Command notice_lang(s_NickServ, u, NICK_INFO_REALNAME, na->nick, na->last_realname); - // XXX: we should perhaps show their opertype here. if (na->nc->IsServicesOper()) { if (show_hidden || (!(na->nc->flags & NI_HIDE_STATUS))) diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index cb5ce25e0..d72753208 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -48,10 +48,6 @@ class CommandNSLogout : public Command cancel_user(u2); validate_user(u2); } - else if (na) - { - na->status &= ~(NS_IDENTIFIED | NS_RECOGNIZED); - } if (ircd->modeonunreg) common_svsmode(u2, ircd->modeonunreg, "1"); diff --git a/src/core/ns_register.c b/src/core/ns_register.c index 886c879fa..ff16e5b33 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -37,7 +37,6 @@ class CommandNSConfirm : public Command char tmp_pass[PASSMAX]; memcpy(na->nc->pass, nr->password, PASSMAX); - na->status = static_cast<int16>(NS_IDENTIFIED | NS_RECOGNIZED); na->nc->flags |= NSDefFlags; @@ -430,6 +429,7 @@ NickAlias *makenick(const char *nick) na = new NickAlias; na->nick = sstrdup(nick); na->nc = nc; + na->status = 0; slist_add(&nc->aliases, na); alpha_insert_alias(na); return na; diff --git a/src/core/ns_status.c b/src/core/ns_status.c index 92913a30b..e8f99fa78 100644 --- a/src/core/ns_status.c +++ b/src/core/ns_status.c @@ -43,7 +43,7 @@ class CommandNSStatus : public Command notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 0, ""); else if (nick_identified(u2) && na && na->nc == u2->nc) /* Nick is identified */ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 3, u2->nc->display); - else if (nick_recognized(u2)) /* Nick is recognised, but NOT identified */ + else if (u2->IsRecognized()) /* Nick is recognised, but NOT identified */ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 2, (u2->nc ? u2->nc->display : "")); else if (!na) /* Nick is online, but NOT a registered */ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 0, ""); diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c index 3e1b5ba4f..0b1adcf2e 100644 --- a/src/core/ns_suspend.c +++ b/src/core/ns_suspend.c @@ -65,7 +65,6 @@ class CommandNSSuspend : public Command na2 = static_cast<NickAlias *>(na->nc->aliases.list[i]); if (na2->nc == na->nc) { - na2->status &= ~(NS_IDENTIFIED | NS_RECOGNIZED); if (na2->last_quit) delete [] na2->last_quit; na2->last_quit = sstrdup(reason); diff --git a/src/core/ns_update.c b/src/core/ns_update.c index dc2de462c..9b18a4596 100644 --- a/src/core/ns_update.c +++ b/src/core/ns_update.c @@ -35,7 +35,6 @@ class CommandNSUpdate : public Command if (na->last_realname) delete [] na->last_realname; na->last_realname = sstrdup(u->realname); - na->status |= NS_IDENTIFIED; na->last_seen = time(NULL); if (ircd->vhost) do_on_id(u); |