mirror of
https://github.com/anope/anope.git
synced 2026-07-07 17:43:14 +02:00
Use consistent casing when referring to vhosts and vidents.
This commit is contained in:
+8
-8
@@ -65,41 +65,41 @@ public:
|
||||
* @param creator Who created the vhost
|
||||
* @param time When the vhost was created
|
||||
*/
|
||||
void SetVhost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
|
||||
void SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
|
||||
|
||||
/** Remove a users vhost
|
||||
**/
|
||||
void RemoveVhost();
|
||||
void RemoveVHost();
|
||||
|
||||
/** Check if the user has a vhost
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasVhost() const;
|
||||
bool HasVHost() const;
|
||||
|
||||
/** Retrieve the vhost ident
|
||||
* @return the ident
|
||||
*/
|
||||
const Anope::string &GetVhostIdent() const;
|
||||
const Anope::string &GetVHostIdent() const;
|
||||
|
||||
/** Retrieve the vhost host
|
||||
* @return the host
|
||||
*/
|
||||
const Anope::string &GetVhostHost() const;
|
||||
const Anope::string &GetVHostHost() const;
|
||||
|
||||
/** Retrieve the vhost mask
|
||||
* @param the mask
|
||||
*/
|
||||
Anope::string GetVhostMask() const;
|
||||
Anope::string GetVHostMask() const;
|
||||
|
||||
/** Retrieve the vhost creator
|
||||
* @return the creator
|
||||
*/
|
||||
const Anope::string &GetVhostCreator() const;
|
||||
const Anope::string &GetVHostCreator() const;
|
||||
|
||||
/** Retrieve when the vhost was created
|
||||
* @return the time it was created
|
||||
*/
|
||||
time_t GetVhostCreated() const;
|
||||
time_t GetVHostCreated() const;
|
||||
|
||||
/** Finds a registered nick
|
||||
* @param nick The nick to lookup
|
||||
|
||||
+6
-6
@@ -121,9 +121,9 @@ namespace Language
|
||||
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
|
||||
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
|
||||
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
|
||||
#define HOST_SET_ERROR _("A vHost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vHost ident must be in the format of a valid ident.")
|
||||
#define HOST_SET_TOOLONG _("Error! The vHost is too long, please use a hostname shorter than %zu characters.")
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The vHost ident is too long, please use an ident shorter than %zu characters.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vHost assigned to this nick.")
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug")
|
||||
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vident must be in the format of a valid ident.")
|
||||
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
|
||||
|
||||
+3
-3
@@ -838,12 +838,12 @@ public:
|
||||
/** Called when a vhost is deleted
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnDeleteVhost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnDeleteVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a vhost is set
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnSetVhost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnSetVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a users host changes
|
||||
* @param u The user
|
||||
@@ -1081,7 +1081,7 @@ enum Implementation
|
||||
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickConfirm, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
|
||||
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearCert,
|
||||
I_OnNickAddCert, I_OnNickEraseCert, I_OnNickInfo, I_OnBotInfo, I_OnCheckAuthentication, I_OnNickUpdate,
|
||||
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
|
||||
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVHost, I_OnSetVHost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
|
||||
I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd,
|
||||
I_OnMLock, I_OnUnMLock, I_OnModuleLoad, I_OnModuleUnload, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, I_OnBotNotice,
|
||||
I_OnPrivmsg, I_OnLog, I_OnLogMessage, I_OnDnsRequest, I_OnCheckModes, I_OnChannelSync, I_OnSetCorrectModes,
|
||||
|
||||
+2
-2
@@ -159,8 +159,8 @@ public:
|
||||
* @param vident The ident to set
|
||||
* @param vhost The vhost to set
|
||||
*/
|
||||
virtual void SendVhost(User *u, const Anope::string &vident, const Anope::string &vhost) { }
|
||||
virtual void SendVhostDel(User *) { }
|
||||
virtual void SendVHost(User *u, const Anope::string &vident, const Anope::string &vhost) { }
|
||||
virtual void SendVHostDel(User *) { }
|
||||
|
||||
/** Sets an akill. This is a recursive function that can be called multiple times
|
||||
* for the same xline, but for different users, if the xline is not one that can be
|
||||
|
||||
+60
-112
@@ -7,8 +7,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Anope\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-03-14 22:53+0000\n"
|
||||
"PO-Revision-Date: 2024-03-14 22:54+0000\n"
|
||||
"POT-Creation-Date: 2024-03-15 12:41+0000\n"
|
||||
"PO-Revision-Date: 2024-03-15 12:41+0000\n"
|
||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
||||
"Language-Team: English\n"
|
||||
"Language: en_US\n"
|
||||
@@ -1711,11 +1711,11 @@ msgstr ""
|
||||
"A notification memo has been sent to %s informing them you have\n"
|
||||
"read their memo."
|
||||
|
||||
msgid "A vHost ident must be in the format of a valid ident."
|
||||
msgstr "A vHost ident must be in the format of a valid ident."
|
||||
msgid "A vhost must be in the format of a valid hostname."
|
||||
msgstr "A vhost must be in the format of a valid hostname."
|
||||
|
||||
msgid "A vHost must be in the format of a valid hostname."
|
||||
msgstr "A vHost must be in the format of a valid hostname."
|
||||
msgid "A vident must be in the format of a valid ident."
|
||||
msgstr "A vident must be in the format of a valid ident."
|
||||
|
||||
msgid "ADD expiry {nick|mask} [reason]"
|
||||
msgstr "ADD expiry {nick|mask} [reason]"
|
||||
@@ -1815,8 +1815,8 @@ msgstr "Account %s has already reached the maximum number of simultaneous logi
|
||||
msgid "Accounts can not be registered right now. Please try again later."
|
||||
msgstr "Accounts can not be registered right now. Please try again later."
|
||||
|
||||
msgid "Activate the requested vHost for the given nick."
|
||||
msgstr "Activate the requested vHost for the given nick."
|
||||
msgid "Activate the requested vhost for the given nick."
|
||||
msgstr "Activate the requested vhost for the given nick."
|
||||
|
||||
msgid ""
|
||||
"Activates the vhost currently assigned to the nick in use.\n"
|
||||
@@ -2458,8 +2458,8 @@ msgstr ""
|
||||
"Alternative methods of modifying channel access lists are\n"
|
||||
"available."
|
||||
|
||||
msgid "Approve the requested vHost of a user"
|
||||
msgstr "Approve the requested vHost of a user"
|
||||
msgid "Approve the requested vhost of a user"
|
||||
msgstr "Approve the requested vhost of a user"
|
||||
|
||||
msgid "As a Services Operator, you may drop any nick."
|
||||
msgstr "As a Services Operator, you may drop any nick."
|
||||
@@ -3937,12 +3937,12 @@ msgid "Error reloading configuration file: %s"
|
||||
msgstr "Error reloading configuration file: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "Error! The vHost ident is too long, please use an ident shorter than %zu characters."
|
||||
msgstr "Error! The vHost ident is too long, please use an ident shorter than %zu characters."
|
||||
msgid "Error! The vhost is too long, please use a hostname shorter than %zu characters."
|
||||
msgstr "Error! The vhost is too long, please use a hostname shorter than %zu characters."
|
||||
|
||||
#, c-format
|
||||
msgid "Error! The vHost is too long, please use a hostname shorter than %zu characters."
|
||||
msgstr "Error! The vHost is too long, please use a hostname shorter than %zu characters."
|
||||
msgid "Error! The vident is too long, please use an ident shorter than %zu characters."
|
||||
msgstr "Error! The vident is too long, please use an ident shorter than %zu characters."
|
||||
|
||||
msgid ""
|
||||
"Examples:\n"
|
||||
@@ -5386,8 +5386,8 @@ msgstr "Persistent"
|
||||
msgid "Please confirm that you want to drop %s with %s%s DROP %s %s"
|
||||
msgstr "Please confirm that you want to drop %s with %s%s DROP %s %s"
|
||||
|
||||
msgid "Please contact an Operator to get a vHost assigned to this nick."
|
||||
msgstr "Please contact an Operator to get a vHost assigned to this nick."
|
||||
msgid "Please contact an Operator to get a vhost assigned to this nick."
|
||||
msgstr "Please contact an Operator to get a vhost assigned to this nick."
|
||||
|
||||
msgid ""
|
||||
"Please try again with a more obscure password. Passwords should not be\n"
|
||||
@@ -5409,8 +5409,8 @@ msgid "Please wait %lu seconds and retry."
|
||||
msgstr "Please wait %lu seconds and retry."
|
||||
|
||||
#, c-format
|
||||
msgid "Please wait %lu seconds before requesting a new vHost."
|
||||
msgstr "Please wait %lu seconds before requesting a new vHost."
|
||||
msgid "Please wait %lu seconds before requesting a new vhost."
|
||||
msgstr "Please wait %lu seconds before requesting a new vhost."
|
||||
|
||||
#, c-format
|
||||
msgid "Please wait %lu seconds before using the %s command again."
|
||||
@@ -5695,11 +5695,11 @@ msgstr "Registration is currently disabled."
|
||||
msgid "Regulate the use of critical commands"
|
||||
msgstr "Regulate the use of critical commands"
|
||||
|
||||
msgid "Reject the requested vHost for the given nick."
|
||||
msgstr "Reject the requested vHost for the given nick."
|
||||
msgid "Reject the requested vhost for the given nick."
|
||||
msgstr "Reject the requested vhost for the given nick."
|
||||
|
||||
msgid "Reject the requested vHost of a user"
|
||||
msgstr "Reject the requested vHost of a user"
|
||||
msgid "Reject the requested vhost of a user"
|
||||
msgstr "Reject the requested vhost of a user"
|
||||
|
||||
msgid "Releases a suspended channel"
|
||||
msgstr "Releases a suspended channel"
|
||||
@@ -5769,15 +5769,15 @@ msgstr "Removing %s because %s covers it."
|
||||
msgid "Repeat kicker"
|
||||
msgstr "Repeat kicker"
|
||||
|
||||
msgid "Request a vHost for your nick"
|
||||
msgstr "Request a vHost for your nick"
|
||||
msgid "Request a vhost for your nick"
|
||||
msgstr "Request a vhost for your nick"
|
||||
|
||||
msgid ""
|
||||
"Request the given vHost to be activated for your nick by the\n"
|
||||
"Request the given vhost to be activated for your nick by the\n"
|
||||
"network administrators. Please be patient while your request\n"
|
||||
"is being considered."
|
||||
msgstr ""
|
||||
"Request the given vHost to be activated for your nick by the\n"
|
||||
"Request the given vhost to be activated for your nick by the\n"
|
||||
"network administrators. Please be patient while your request\n"
|
||||
"is being considered."
|
||||
|
||||
@@ -6392,14 +6392,14 @@ msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Sets the vhost for all nicks in the same group as that\n"
|
||||
"of the given nick. If your IRCD supports vIdents, then\n"
|
||||
"of the given nick. If your IRCD supports vidents, then\n"
|
||||
"using SETALL <nick> <ident>@<hostmask> will set idents\n"
|
||||
"for users as well as vhosts.\n"
|
||||
"* NOTE, this will not update the vhost for any nicks\n"
|
||||
"added to the group after this command was used."
|
||||
msgstr ""
|
||||
"Sets the vhost for all nicks in the same group as that\n"
|
||||
"of the given nick. If your IRCD supports vIdents, then\n"
|
||||
"of the given nick. If your IRCD supports vidents, then\n"
|
||||
"using SETALL <nick> <ident>@<hostmask> will set idents\n"
|
||||
"for users as well as vhosts.\n"
|
||||
"* NOTE, this will not update the vhost for any nicks\n"
|
||||
@@ -6407,12 +6407,12 @@ msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Sets the vhost for the given nick to that of the given\n"
|
||||
"hostmask. If your IRCD supports vIdents, then using\n"
|
||||
"hostmask. If your IRCD supports vidents, then using\n"
|
||||
"SET <nick> <ident>@<hostmask> set idents for users as\n"
|
||||
"well as vhosts."
|
||||
msgstr ""
|
||||
"Sets the vhost for the given nick to that of the given\n"
|
||||
"hostmask. If your IRCD supports vIdents, then using\n"
|
||||
"hostmask. If your IRCD supports vidents, then using\n"
|
||||
"SET <nick> <ident>@<hostmask> set idents for users as\n"
|
||||
"well as vhosts."
|
||||
|
||||
@@ -6567,55 +6567,6 @@ msgstr "Sorry, %s is temporarily unavailable."
|
||||
msgid "Sorry, I have not seen %s."
|
||||
msgstr "Sorry, I have not seen %s."
|
||||
|
||||
msgid "Sorry, bad words list modification is temporarily disabled."
|
||||
msgstr "Sorry, bad words list modification is temporarily disabled."
|
||||
|
||||
msgid "Sorry, bot assignment is temporarily disabled."
|
||||
msgstr "Sorry, bot assignment is temporarily disabled."
|
||||
|
||||
msgid "Sorry, bot modification is temporarily disabled."
|
||||
msgstr "Sorry, bot modification is temporarily disabled."
|
||||
|
||||
msgid "Sorry, bot option setting is temporarily disabled."
|
||||
msgstr "Sorry, bot option setting is temporarily disabled."
|
||||
|
||||
msgid "Sorry, changing bot options is temporarily disabled."
|
||||
msgstr "Sorry, changing bot options is temporarily disabled."
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, channel %s list modification is temporarily disabled."
|
||||
msgstr "Sorry, channel %s list modification is temporarily disabled."
|
||||
|
||||
msgid "Sorry, channel access list modification is temporarily disabled."
|
||||
msgstr "Sorry, channel access list modification is temporarily disabled."
|
||||
|
||||
msgid "Sorry, channel autokick list modification is temporarily disabled."
|
||||
msgstr "Sorry, channel autokick list modification is temporarily disabled."
|
||||
|
||||
msgid "Sorry, channel de-registration is temporarily disabled."
|
||||
msgstr "Sorry, channel de-registration is temporarily disabled."
|
||||
|
||||
msgid "Sorry, channel registration is temporarily disabled."
|
||||
msgstr "Sorry, channel registration is temporarily disabled."
|
||||
|
||||
msgid "Sorry, kicker configuration is temporarily disabled."
|
||||
msgstr "Sorry, kicker configuration is temporarily disabled."
|
||||
|
||||
msgid "Sorry, memo option setting is temporarily disabled."
|
||||
msgstr "Sorry, memo option setting is temporarily disabled."
|
||||
|
||||
msgid "Sorry, memo sending is temporarily disabled."
|
||||
msgstr "Sorry, memo sending is temporarily disabled."
|
||||
|
||||
msgid "Sorry, nickname de-registration is temporarily disabled."
|
||||
msgstr "Sorry, nickname de-registration is temporarily disabled."
|
||||
|
||||
msgid "Sorry, nickname grouping is temporarily disabled."
|
||||
msgstr "Sorry, nickname grouping is temporarily disabled."
|
||||
|
||||
msgid "Sorry, nickname registration is temporarily disabled."
|
||||
msgstr "Sorry, nickname registration is temporarily disabled."
|
||||
|
||||
#, c-format
|
||||
msgid "Sorry, the maximum of %d auto join entries has been reached."
|
||||
msgstr "Sorry, the maximum of %d auto join entries has been reached."
|
||||
@@ -8149,14 +8100,30 @@ msgstr "Users list:"
|
||||
msgid "VHost"
|
||||
msgstr "VHost"
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for %s removed."
|
||||
msgstr "VHost for %s removed."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for %s set to %s."
|
||||
msgstr "VHost for %s set to %s."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for %s has been activated."
|
||||
msgstr "VHost for %s has been activated."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for %s has been rejected."
|
||||
msgstr "VHost for %s has been rejected."
|
||||
|
||||
#, c-format
|
||||
msgid "VHost for group %s set to %s."
|
||||
msgstr "VHost for group %s set to %s."
|
||||
|
||||
#, c-format
|
||||
msgid "VHosts for group %s have been removed."
|
||||
msgstr "VHosts for group %s have been removed."
|
||||
|
||||
msgid "VIEW host"
|
||||
msgstr "VIEW host"
|
||||
|
||||
@@ -8173,13 +8140,6 @@ msgstr "Value"
|
||||
msgid "Value of %s:%s changed to %s"
|
||||
msgstr "Value of %s:%s changed to %s"
|
||||
|
||||
msgid "Vhost"
|
||||
msgstr "Vhost"
|
||||
|
||||
#, c-format
|
||||
msgid "Vhost for %s removed."
|
||||
msgstr "Vhost for %s removed."
|
||||
|
||||
msgid "View and change Services Operators"
|
||||
msgstr "View and change Services Operators"
|
||||
|
||||
@@ -8601,8 +8561,8 @@ msgstr "Your IRCd does not support SVSNICK."
|
||||
msgid "Your IRCd does not support SVSPART."
|
||||
msgstr "Your IRCd does not support SVSPART."
|
||||
|
||||
msgid "Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug"
|
||||
msgstr "Your IRCd does not support vIdent's, if this is incorrect, please report this as a possible bug"
|
||||
msgid "Your IRCd does not support vidents. If this is incorrect please report this as a possible bug."
|
||||
msgstr "Your IRCd does not support vidents. If this is incorrect please report this as a possible bug."
|
||||
|
||||
#, c-format
|
||||
msgid "Your account %s has been successfully created."
|
||||
@@ -8698,8 +8658,8 @@ msgstr "Your password is too short. It must be longer than %u characters."
|
||||
msgid "Your password reset request has expired."
|
||||
msgstr "Your password reset request has expired."
|
||||
|
||||
msgid "Your vHost has been requested."
|
||||
msgstr "Your vHost has been requested."
|
||||
msgid "Your vhost has been requested."
|
||||
msgstr "Your vhost has been requested."
|
||||
|
||||
#, c-format
|
||||
msgid "Your vhost of %s is now activated."
|
||||
@@ -8801,19 +8761,19 @@ msgstr "[Suspended]"
|
||||
msgid "[Unconfirmed]"
|
||||
msgstr "[Unconfirmed]"
|
||||
|
||||
msgid "[auto memo] Your requested vHost has been approved."
|
||||
msgstr "[auto memo] Your requested vHost has been approved."
|
||||
#, c-format
|
||||
msgid "[auto memo] VHost %s has been requested by %s."
|
||||
msgstr "[auto memo] VHost %s has been requested by %s."
|
||||
|
||||
msgid "[auto memo] Your requested vHost has been rejected."
|
||||
msgstr "[auto memo] Your requested vHost has been rejected."
|
||||
msgid "[auto memo] Your requested vhost has been approved."
|
||||
msgstr "[auto memo] Your requested vhost has been approved."
|
||||
|
||||
msgid "[auto memo] Your requested vhost has been rejected."
|
||||
msgstr "[auto memo] Your requested vhost has been rejected."
|
||||
|
||||
#, c-format
|
||||
msgid "[auto memo] Your requested vHost has been rejected. Reason: %s"
|
||||
msgstr "[auto memo] Your requested vHost has been rejected. Reason: %s"
|
||||
|
||||
#, c-format
|
||||
msgid "[auto memo] vHost %s has been requested by %s."
|
||||
msgstr "[auto memo] vHost %s has been requested by %s."
|
||||
msgid "[auto memo] Your requested vhost has been rejected. Reason: %s"
|
||||
msgstr "[auto memo] Your requested vhost has been rejected. Reason: %s"
|
||||
|
||||
msgid "[{pattern | channel} [INVISIBLE]]"
|
||||
msgstr "[{pattern | channel} [INVISIBLE]]"
|
||||
@@ -8890,21 +8850,9 @@ msgstr "second"
|
||||
msgid "seconds"
|
||||
msgstr "seconds"
|
||||
|
||||
#, c-format
|
||||
msgid "vHost for %s has been activated."
|
||||
msgstr "vHost for %s has been activated."
|
||||
|
||||
#, c-format
|
||||
msgid "vHost for %s has been rejected."
|
||||
msgstr "vHost for %s has been rejected."
|
||||
|
||||
msgid "vhost"
|
||||
msgstr "vhost"
|
||||
|
||||
#, c-format
|
||||
msgid "vhosts for group %s have been removed."
|
||||
msgstr "vhosts for group %s have been removed."
|
||||
|
||||
msgid "year"
|
||||
msgstr "year"
|
||||
|
||||
|
||||
@@ -1115,7 +1115,7 @@ private:
|
||||
if (nick_vhost != data->vhost_nick.end())
|
||||
vhost = nick_vhost->second;
|
||||
if (!vhost.empty())
|
||||
na->SetVhost("", vhost, data->vhost_creator, data->vhost_ts);
|
||||
na->SetVHost("", vhost, data->vhost_creator, data->vhost_ts);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -690,7 +690,7 @@ static void LoadVHosts()
|
||||
continue;
|
||||
}
|
||||
|
||||
na->SetVhost(ident, host, creator, vtime);
|
||||
na->SetVHost(ident, host, creator, vtime);
|
||||
|
||||
Log() << "Loaded vhost for " << na->nick;
|
||||
}
|
||||
|
||||
@@ -42,35 +42,35 @@ public:
|
||||
return;
|
||||
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVhost())
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
if (!na || !na->HasVhost())
|
||||
if (!na || !na->HasVHost())
|
||||
return;
|
||||
|
||||
if (u->vhost.empty() || !u->vhost.equals_cs(na->GetVhostHost()) || (!na->GetVhostIdent().empty() && !u->GetVIdent().equals_cs(na->GetVhostIdent())))
|
||||
if (u->vhost.empty() || !u->vhost.equals_cs(na->GetVHostHost()) || (!na->GetVHostIdent().empty() && !u->GetVIdent().equals_cs(na->GetVHostIdent())))
|
||||
{
|
||||
IRCD->SendVhost(u, na->GetVhostIdent(), na->GetVhostHost());
|
||||
IRCD->SendVHost(u, na->GetVHostIdent(), na->GetVHostHost());
|
||||
|
||||
u->vhost = na->GetVhostHost();
|
||||
u->vhost = na->GetVHostHost();
|
||||
u->UpdateHost();
|
||||
|
||||
if (IRCD->CanSetVIdent && !na->GetVhostIdent().empty())
|
||||
u->SetVIdent(na->GetVhostIdent());
|
||||
if (IRCD->CanSetVIdent && !na->GetVHostIdent().empty())
|
||||
u->SetVIdent(na->GetVHostIdent());
|
||||
|
||||
if (HostServ)
|
||||
{
|
||||
u->SendMessage(HostServ, _("Your vhost of \002%s\002 is now activated."),
|
||||
na->GetVhostMask().c_str());
|
||||
na->GetVHostMask().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnNickDrop(CommandSource &source, NickAlias *na) override
|
||||
{
|
||||
if (na->HasVhost())
|
||||
if (na->HasVHost())
|
||||
{
|
||||
FOREACH_MOD(OnDeleteVhost, (na));
|
||||
na->RemoveVhost();
|
||||
FOREACH_MOD(OnDeleteVHost, (na));
|
||||
na->RemoveVHost();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
void OnSetVhost(NickAlias *na) override
|
||||
void OnSetVHost(NickAlias *na) override
|
||||
{
|
||||
if (Config->GetModule(this)->Get<bool>("activate_on_set"))
|
||||
{
|
||||
@@ -95,31 +95,31 @@ public:
|
||||
|
||||
if (u && u->Account() == na->nc)
|
||||
{
|
||||
IRCD->SendVhost(u, na->GetVhostIdent(), na->GetVhostHost());
|
||||
IRCD->SendVHost(u, na->GetVHostIdent(), na->GetVHostHost());
|
||||
|
||||
u->vhost = na->GetVhostHost();
|
||||
u->vhost = na->GetVHostHost();
|
||||
u->UpdateHost();
|
||||
|
||||
if (IRCD->CanSetVIdent && !na->GetVhostIdent().empty())
|
||||
u->SetVIdent(na->GetVhostIdent());
|
||||
if (IRCD->CanSetVIdent && !na->GetVHostIdent().empty())
|
||||
u->SetVIdent(na->GetVHostIdent());
|
||||
|
||||
if (HostServ)
|
||||
{
|
||||
u->SendMessage(HostServ, _("Your vhost of \002%s\002 is now activated."),
|
||||
na->GetVhostMask().c_str());
|
||||
na->GetVHostMask().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnDeleteVhost(NickAlias *na) override
|
||||
void OnDeleteVHost(NickAlias *na) override
|
||||
{
|
||||
if (Config->GetModule(this)->Get<bool>("activate_on_set"))
|
||||
{
|
||||
User *u = User::Find(na->nick);
|
||||
|
||||
if (u && u->Account() == na->nc)
|
||||
IRCD->SendVhostDel(u);
|
||||
IRCD->SendVHostDel(u);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,9 +34,9 @@ public:
|
||||
if (na)
|
||||
{
|
||||
Log(LOG_ADMIN, source, this) << "for user " << na->nick;
|
||||
FOREACH_MOD(OnDeleteVhost, (na));
|
||||
na->RemoveVhost();
|
||||
source.Reply(_("Vhost for \002%s\002 removed."), nick.c_str());
|
||||
FOREACH_MOD(OnDeleteVHost, (na));
|
||||
na->RemoveVHost();
|
||||
source.Reply(_("VHost for \002%s\002 removed."), nick.c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
@@ -74,15 +74,15 @@ public:
|
||||
NickAlias *na = NickAlias::Find(nick);
|
||||
if (na)
|
||||
{
|
||||
FOREACH_MOD(OnDeleteVhost, (na));
|
||||
FOREACH_MOD(OnDeleteVHost, (na));
|
||||
const NickCore *nc = na->nc;
|
||||
for (auto *alias : *nc->aliases)
|
||||
{
|
||||
na = alias;
|
||||
na->RemoveVhost();
|
||||
na->RemoveVHost();
|
||||
}
|
||||
Log(LOG_ADMIN, source, this) << "for all nicks in group " << nc->display;
|
||||
source.Reply(_("vhosts for group \002%s\002 have been removed."), nc->display.c_str());
|
||||
source.Reply(_("VHosts for group \002%s\002 have been removed."), nc->display.c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
if (setting)
|
||||
return;
|
||||
|
||||
if (!na || !na->HasVhost())
|
||||
if (!na || !na->HasVHost())
|
||||
return;
|
||||
|
||||
setting = true;
|
||||
@@ -30,8 +30,8 @@ public:
|
||||
{
|
||||
if (nick && nick != na)
|
||||
{
|
||||
nick->SetVhost(na->GetVhostIdent(), na->GetVhostHost(), na->GetVhostCreator());
|
||||
FOREACH_MOD(OnSetVhost, (nick));
|
||||
nick->SetVHost(na->GetVHostIdent(), na->GetVHostHost(), na->GetVHostCreator());
|
||||
FOREACH_MOD(OnSetVHost, (nick));
|
||||
}
|
||||
}
|
||||
setting = false;
|
||||
@@ -51,11 +51,11 @@ public:
|
||||
}
|
||||
|
||||
NickAlias *na = NickAlias::Find(source.GetNick());
|
||||
if (na && source.GetAccount() == na->nc && na->HasVhost())
|
||||
if (na && source.GetAccount() == na->nc && na->HasVHost())
|
||||
{
|
||||
this->Sync(na);
|
||||
source.Reply(_("All vhosts in the group \002%s\002 have been set to \002%s\002."),
|
||||
source.nc->display.c_str(), na->GetVhostMask().c_str());
|
||||
source.nc->display.c_str(), na->GetVHostMask().c_str());
|
||||
}
|
||||
else
|
||||
source.Reply(HOST_NOT_ASSIGNED);
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
throw ModuleException("Your IRCd does not support vhosts");
|
||||
}
|
||||
|
||||
void OnSetVhost(NickAlias *na) override
|
||||
void OnSetVHost(NickAlias *na) override
|
||||
{
|
||||
if (!synconset)
|
||||
return;
|
||||
|
||||
@@ -53,25 +53,25 @@ public:
|
||||
|
||||
unsigned display_counter = 0, listmax = Config->GetModule(this->owner)->Get<unsigned>("listmax", "50");
|
||||
ListFormatter list(source.GetAccount());
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("Vhost")).AddColumn(_("Creator")).AddColumn(_("Created"));
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("VHost")).AddColumn(_("Creator")).AddColumn(_("Created"));
|
||||
|
||||
for (const auto &[_, na] : *NickAliasList)
|
||||
{
|
||||
if (!na->HasVhost())
|
||||
if (!na->HasVHost())
|
||||
continue;
|
||||
|
||||
if (!key.empty() && key[0] != '#')
|
||||
{
|
||||
if ((Anope::Match(na->nick, key) || Anope::Match(na->GetVhostHost(), key)) && display_counter < listmax)
|
||||
if ((Anope::Match(na->nick, key) || Anope::Match(na->GetVHostHost(), key)) && display_counter < listmax)
|
||||
{
|
||||
++display_counter;
|
||||
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = Anope::ToString(display_counter);
|
||||
entry["Nick"] = na->nick;
|
||||
entry["Vhost"] = na->GetVhostMask();
|
||||
entry["Creator"] = na->GetVhostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated(), NULL, true);
|
||||
entry["VHost"] = na->GetVHostMask();
|
||||
entry["Creator"] = na->GetVHostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVHostCreated(), NULL, true);
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
@@ -87,9 +87,9 @@ public:
|
||||
ListFormatter::ListEntry entry;
|
||||
entry["Number"] = Anope::ToString(display_counter);
|
||||
entry["Nick"] = na->nick;
|
||||
entry["Vhost"] = na->GetVhostMask();
|
||||
entry["Creator"] = na->GetVhostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVhostCreated(), NULL, true);
|
||||
entry["VHost"] = na->GetVHostMask();
|
||||
entry["Creator"] = na->GetVHostCreator();
|
||||
entry["Created"] = Anope::strftime(na->GetVHostCreated(), NULL, true);
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,15 +26,15 @@ public:
|
||||
User *u = source.GetUser();
|
||||
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVhost())
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
|
||||
if (!na || !na->HasVhost())
|
||||
if (!na || !na->HasVHost())
|
||||
source.Reply(HOST_NOT_ASSIGNED);
|
||||
else
|
||||
{
|
||||
u->vhost.clear();
|
||||
IRCD->SendVhostDel(u);
|
||||
IRCD->SendVHostDel(u);
|
||||
u->UpdateHost();
|
||||
Log(LOG_COMMAND, source, this) << "to disable their vhost";
|
||||
source.Reply(_("Your vhost was removed and the normal cloaking restored."));
|
||||
|
||||
@@ -28,16 +28,16 @@ public:
|
||||
|
||||
User *u = source.GetUser();
|
||||
const NickAlias *na = NickAlias::Find(u->nick);
|
||||
if (!na || na->nc != u->Account() || !na->HasVhost())
|
||||
if (!na || na->nc != u->Account() || !na->HasVHost())
|
||||
na = NickAlias::Find(u->Account()->display);
|
||||
if (na && u->Account() == na->nc && na->HasVhost())
|
||||
if (na && u->Account() == na->nc && na->HasVHost())
|
||||
{
|
||||
source.Reply(_("Your vhost of \002%s\002 is now activated."), na->GetVhostMask().c_str());
|
||||
Log(LOG_COMMAND, source, this) << "to enable their vhost of " << na->GetVhostMask();
|
||||
IRCD->SendVhost(u, na->GetVhostIdent(), na->GetVhostHost());
|
||||
u->vhost = na->GetVhostHost();
|
||||
if (IRCD->CanSetVIdent && !na->GetVhostIdent().empty())
|
||||
u->SetVIdent(na->GetVhostIdent());
|
||||
source.Reply(_("Your vhost of \002%s\002 is now activated."), na->GetVHostMask().c_str());
|
||||
Log(LOG_COMMAND, source, this) << "to enable their vhost of " << na->GetVHostMask();
|
||||
IRCD->SendVHost(u, na->GetVHostIdent(), na->GetVHostHost());
|
||||
u->vhost = na->GetVHostHost();
|
||||
if (IRCD->CanSetVIdent && !na->GetVHostIdent().empty())
|
||||
u->SetVIdent(na->GetVHostIdent());
|
||||
u->UpdateHost();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
static ServiceReference<MemoServService> memoserv("MemoServService", "MemoServ");
|
||||
|
||||
static void req_send_memos(Module *me, CommandSource &source, const Anope::string &vIdent, const Anope::string &vHost);
|
||||
static void req_send_memos(Module *me, CommandSource &source, const Anope::string &vident, const Anope::string &vhost);
|
||||
|
||||
struct HostRequestImpl final
|
||||
: HostRequest
|
||||
@@ -75,7 +75,7 @@ class CommandHSRequest final
|
||||
public:
|
||||
CommandHSRequest(Module *creator) : Command(creator, "hostserv/request", 1, 1)
|
||||
{
|
||||
this->SetDesc(_("Request a vHost for your nick"));
|
||||
this->SetDesc(_("Request a vhost for your nick"));
|
||||
this->SetSyntax(_("vhost"));
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
time_t send_delay = Config->GetModule("memoserv")->Get<time_t>("senddelay");
|
||||
if (Config->GetModule(this->owner)->Get<bool>("memooper") && send_delay > 0 && u && u->lastmemosend + send_delay > Anope::CurTime)
|
||||
{
|
||||
source.Reply(_("Please wait %lu seconds before requesting a new vHost."), (unsigned long)send_delay);
|
||||
source.Reply(_("Please wait %lu seconds before requesting a new vhost."), (unsigned long)send_delay);
|
||||
u->lastmemosend = Anope::CurTime;
|
||||
return;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
req.time = Anope::CurTime;
|
||||
na->Extend<HostRequestImpl>("hostrequest", req);
|
||||
|
||||
source.Reply(_("Your vHost has been requested."));
|
||||
source.Reply(_("Your vhost has been requested."));
|
||||
req_send_memos(owner, source, user, host);
|
||||
Log(LOG_COMMAND, source, this) << "to request new vhost " << (!user.empty() ? user + "@" : "") << host;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Request the given vHost to be activated for your nick by the\n"
|
||||
source.Reply(_("Request the given vhost to be activated for your nick by the\n"
|
||||
"network administrators. Please be patient while your request\n"
|
||||
"is being considered."));
|
||||
return true;
|
||||
@@ -191,7 +191,7 @@ class CommandHSActivate final
|
||||
public:
|
||||
CommandHSActivate(Module *creator) : Command(creator, "hostserv/activate", 1, 1)
|
||||
{
|
||||
this->SetDesc(_("Approve the requested vHost of a user"));
|
||||
this->SetDesc(_("Approve the requested vhost of a user"));
|
||||
this->SetSyntax(_("\037nick\037"));
|
||||
}
|
||||
|
||||
@@ -209,13 +209,13 @@ public:
|
||||
HostRequestImpl *req = na ? na->GetExt<HostRequestImpl>("hostrequest") : NULL;
|
||||
if (req)
|
||||
{
|
||||
na->SetVhost(req->ident, req->host, source.GetNick(), req->time);
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
na->SetVHost(req->ident, req->host, source.GetNick(), req->time);
|
||||
FOREACH_MOD(OnSetVHost, (na));
|
||||
|
||||
if (Config->GetModule(this->owner)->Get<bool>("memouser") && memoserv)
|
||||
memoserv->Send(source.service->nick, na->nick, _("[auto memo] Your requested vHost has been approved."), true);
|
||||
memoserv->Send(source.service->nick, na->nick, _("[auto memo] Your requested vhost has been approved."), true);
|
||||
|
||||
source.Reply(_("vHost for %s has been activated."), na->nick.c_str());
|
||||
source.Reply(_("VHost for %s has been activated."), na->nick.c_str());
|
||||
Log(LOG_COMMAND, source, this) << "for " << na->nick << " for vhost " << (!req->ident.empty() ? req->ident + "@" : "") << req->host;
|
||||
na->Shrink<HostRequestImpl>("hostrequest");
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Activate the requested vHost for the given nick."));
|
||||
source.Reply(_("Activate the requested vhost for the given nick."));
|
||||
if (Config->GetModule(this->owner)->Get<bool>("memouser"))
|
||||
source.Reply(_("A memo informing the user will also be sent."));
|
||||
|
||||
@@ -241,7 +241,7 @@ class CommandHSReject final
|
||||
public:
|
||||
CommandHSReject(Module *creator) : Command(creator, "hostserv/reject", 1, 2)
|
||||
{
|
||||
this->SetDesc(_("Reject the requested vHost of a user"));
|
||||
this->SetDesc(_("Reject the requested vhost of a user"));
|
||||
this->SetSyntax(_("\037nick\037 [\037reason\037]"));
|
||||
}
|
||||
|
||||
@@ -266,14 +266,14 @@ public:
|
||||
{
|
||||
Anope::string message;
|
||||
if (!reason.empty())
|
||||
message = Anope::printf(_("[auto memo] Your requested vHost has been rejected. Reason: %s"), reason.c_str());
|
||||
message = Anope::printf(_("[auto memo] Your requested vhost has been rejected. Reason: %s"), reason.c_str());
|
||||
else
|
||||
message = _("[auto memo] Your requested vHost has been rejected.");
|
||||
message = _("[auto memo] Your requested vhost has been rejected.");
|
||||
|
||||
memoserv->Send(source.service->nick, nick, Language::Translate(source.GetAccount(), message.c_str()), true);
|
||||
}
|
||||
|
||||
source.Reply(_("vHost for %s has been rejected."), nick.c_str());
|
||||
source.Reply(_("VHost for %s has been rejected."), nick.c_str());
|
||||
Log(LOG_COMMAND, source, this) << "to reject vhost for " << nick << " (" << (!reason.empty() ? reason : "no reason") << ")";
|
||||
}
|
||||
else
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Reject the requested vHost for the given nick."));
|
||||
source.Reply(_("Reject the requested vhost for the given nick."));
|
||||
if (Config->GetModule(this->owner)->Get<bool>("memouser"))
|
||||
source.Reply(_("A memo informing the user will also be sent, which includes the reason for the rejection if supplied."));
|
||||
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
unsigned display_counter = 0, listmax = Config->GetModule(this->owner)->Get<unsigned>("listmax");
|
||||
ListFormatter list(source.GetAccount());
|
||||
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("Vhost")).AddColumn(_("Created"));
|
||||
list.AddColumn(_("Number")).AddColumn(_("Nick")).AddColumn(_("VHost")).AddColumn(_("Created"));
|
||||
|
||||
for (const auto &[nick, na] : *NickAliasList)
|
||||
{
|
||||
@@ -323,9 +323,9 @@ public:
|
||||
entry["Number"] = Anope::ToString(display_counter);
|
||||
entry["Nick"] = nick;
|
||||
if (!hr->ident.empty())
|
||||
entry["Vhost"] = hr->ident + "@" + hr->host;
|
||||
entry["VHost"] = hr->ident + "@" + hr->host;
|
||||
else
|
||||
entry["Vhost"] = hr->host;
|
||||
entry["VHost"] = hr->host;
|
||||
entry["Created"] = Anope::strftime(hr->time, NULL, true);
|
||||
list.AddEntry(entry);
|
||||
}
|
||||
@@ -371,13 +371,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static void req_send_memos(Module *me, CommandSource &source, const Anope::string &vIdent, const Anope::string &vHost)
|
||||
static void req_send_memos(Module *me, CommandSource &source, const Anope::string &vident, const Anope::string &vhost)
|
||||
{
|
||||
Anope::string host;
|
||||
if (!vIdent.empty())
|
||||
host = vIdent + "@" + vHost;
|
||||
if (!vident.empty())
|
||||
host = vident + "@" + vhost;
|
||||
else
|
||||
host = vHost;
|
||||
host = vhost;
|
||||
|
||||
if (Config->GetModule(me)->Get<bool>("memooper") && memoserv)
|
||||
{
|
||||
@@ -387,7 +387,7 @@ static void req_send_memos(Module *me, CommandSource &source, const Anope::strin
|
||||
if (!na)
|
||||
continue;
|
||||
|
||||
Anope::string message = Anope::printf(_("[auto memo] vHost \002%s\002 has been requested by %s."), host.c_str(), source.GetNick().c_str());
|
||||
Anope::string message = Anope::printf(_("[auto memo] VHost \002%s\002 has been requested by %s."), host.c_str(), source.GetNick().c_str());
|
||||
|
||||
memoserv->Send(source.service->nick, na->nick, message, true);
|
||||
}
|
||||
|
||||
+10
-10
@@ -85,9 +85,9 @@ public:
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
|
||||
|
||||
na->SetVhost(user, host, source.GetNick());
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
source.Reply(_("VHost for \002%s\002 set to \002%s\002."), nick.c_str(), na->GetVhostMask().c_str());
|
||||
na->SetVHost(user, host, source.GetNick());
|
||||
FOREACH_MOD(OnSetVHost, (na));
|
||||
source.Reply(_("VHost for \002%s\002 set to \002%s\002."), nick.c_str(), na->GetVHostMask().c_str());
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Sets the vhost for the given nick to that of the given\n"
|
||||
"hostmask. If your IRCD supports vIdents, then using\n"
|
||||
"hostmask. If your IRCD supports vidents, then using\n"
|
||||
"SET <nick> <ident>@<hostmask> set idents for users as\n"
|
||||
"well as vhosts."));
|
||||
return true;
|
||||
@@ -107,13 +107,13 @@ class CommandHSSetAll final
|
||||
{
|
||||
static void Sync(const NickAlias *na)
|
||||
{
|
||||
if (!na || !na->HasVhost())
|
||||
if (!na || !na->HasVHost())
|
||||
return;
|
||||
|
||||
for (auto *nick : *na->nc->aliases)
|
||||
{
|
||||
if (nick && nick != na)
|
||||
nick->SetVhost(na->GetVhostIdent(), na->GetVhostHost(), na->GetVhostCreator());
|
||||
nick->SetVHost(na->GetVHostIdent(), na->GetVHostHost(), na->GetVHostCreator());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,10 +188,10 @@ public:
|
||||
|
||||
Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
|
||||
|
||||
na->SetVhost(user, host, source.GetNick());
|
||||
na->SetVHost(user, host, source.GetNick());
|
||||
this->Sync(na);
|
||||
FOREACH_MOD(OnSetVhost, (na));
|
||||
source.Reply(_("VHost for group \002%s\002 set to \002%s\002."), nick.c_str(), na->GetVhostMask().c_str());
|
||||
FOREACH_MOD(OnSetVHost, (na));
|
||||
source.Reply(_("VHost for group \002%s\002 set to \002%s\002."), nick.c_str(), na->GetVHostMask().c_str());
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Sets the vhost for all nicks in the same group as that\n"
|
||||
"of the given nick. If your IRCD supports vIdents, then\n"
|
||||
"of the given nick. If your IRCD supports vidents, then\n"
|
||||
"using SETALL <nick> <ident>@<hostmask> will set idents\n"
|
||||
"for users as well as vhosts.\n"
|
||||
"* NOTE, this will not update the vhost for any nicks\n"
|
||||
|
||||
@@ -101,8 +101,8 @@ public:
|
||||
|
||||
if (show_hidden)
|
||||
{
|
||||
if (na->HasVhost())
|
||||
info[_("VHost")] = na->GetVhostMask();
|
||||
if (na->HasVHost())
|
||||
info[_("VHost")] = na->GetVHostMask();
|
||||
}
|
||||
|
||||
FOREACH_MOD(OnNickInfo, (source, na, info, show_hidden));
|
||||
|
||||
@@ -263,12 +263,12 @@ public:
|
||||
this->SendSQLineDel(&x);
|
||||
}
|
||||
|
||||
void SendVhost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
void SendVHost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
{
|
||||
Uplink::Send("SVSHOST", u->GetUID(), u->timestamp, host);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
Uplink::Send("SVSHOST", u->GetUID(), u->timestamp, u->host);
|
||||
}
|
||||
|
||||
@@ -94,14 +94,14 @@ private:
|
||||
return nicks.substr(1);
|
||||
}
|
||||
|
||||
static void SendChgIdentInternal(const Anope::string &uid, const Anope::string &vIdent)
|
||||
static void SendChgIdentInternal(const Anope::string &uid, const Anope::string &vident)
|
||||
{
|
||||
if (!Servers::Capab.count("CHGIDENT"))
|
||||
{
|
||||
Log() << "Unable to change the vident of " << uid << " as the remote server does not have the chgident module loaded.";
|
||||
return;
|
||||
}
|
||||
Uplink::Send("ENCAP", uid.substr(0, 3), "CHGIDENT", uid, vIdent);
|
||||
Uplink::Send("ENCAP", uid.substr(0, 3), "CHGIDENT", uid, vident);
|
||||
}
|
||||
|
||||
static void SendChgHostInternal(const Anope::string &uid, const Anope::string &vhost)
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
UserMode *um = ModeManager::FindUserModeByName("CLOAK");
|
||||
|
||||
@@ -477,10 +477,10 @@ public:
|
||||
SendAddLine("Q", x->mask, timeleft, x->by, x->GetReason());
|
||||
}
|
||||
|
||||
void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) override
|
||||
void SendVHost(User *u, const Anope::string &vident, const Anope::string &vhost) override
|
||||
{
|
||||
if (!vIdent.empty())
|
||||
this->SendChgIdentInternal(u->GetUID(), vIdent);
|
||||
if (!vident.empty())
|
||||
this->SendChgIdentInternal(u->GetUID(), vident);
|
||||
|
||||
if (!vhost.empty())
|
||||
this->SendChgHostInternal(u->GetUID(), vhost);
|
||||
@@ -600,11 +600,11 @@ public:
|
||||
|
||||
if (na)
|
||||
{
|
||||
if (!na->GetVhostIdent().empty())
|
||||
SendChgHostInternal(uid, na->GetVhostIdent());
|
||||
if (!na->GetVHostIdent().empty())
|
||||
SendChgHostInternal(uid, na->GetVHostIdent());
|
||||
|
||||
if (!na->GetVhostHost().empty())
|
||||
SendChgHostInternal(uid, na->GetVhostHost());
|
||||
if (!na->GetVHostHost().empty())
|
||||
SendChgHostInternal(uid, na->GetVHostHost());
|
||||
|
||||
// Mark this SASL session as pending user introduction.
|
||||
SASLUser su;
|
||||
|
||||
@@ -125,10 +125,10 @@ public:
|
||||
Uplink::Send("SERVER", server->GetName(), server->GetHops(), server->GetDescription());
|
||||
}
|
||||
|
||||
void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) override
|
||||
void SendVHost(User *u, const Anope::string &vident, const Anope::string &vhost) override
|
||||
{
|
||||
if (!vIdent.empty())
|
||||
Uplink::Send("METADATA", u->nick, "user", vIdent);
|
||||
if (!vident.empty())
|
||||
Uplink::Send("METADATA", u->nick, "user", vident);
|
||||
|
||||
Uplink::Send("METADATA", u->nick, "cloakhost", vhost);
|
||||
if (!u->HasMode("CLOAK"))
|
||||
@@ -138,9 +138,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
this->SendVhost(u, u->GetIdent(), "");
|
||||
this->SendVHost(u, u->GetIdent(), "");
|
||||
}
|
||||
|
||||
bool Format(Anope::string &message, const Anope::map<Anope::string> &tags, const MessageSource &source, const Anope::string &command, const std::vector<Anope::string> ¶ms) override
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
Uplink::Send("ENCAP", u->server->GetName(), "SVSNICK", u->GetUID(), u->timestamp, newnick, when);
|
||||
}
|
||||
|
||||
void SendVhost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
void SendVHost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
{
|
||||
if (!ident.empty())
|
||||
Uplink::Send("ENCAP", '*', "CHGIDENT", u->GetUID(), ident);
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
u->SetMode(Config->GetClient("HostServ"), "CLOAK");
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
u->RemoveMode(Config->GetClient("HostServ"), "CLOAK");
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
void SendSVSLogin(const Anope::string &uid, NickAlias *na) override
|
||||
{
|
||||
Server *s = Server::Find(uid.substr(0, 3));
|
||||
Uplink::Send("ENCAP", s ? s->GetName() : uid.substr(0, 3), "SVSLOGIN", uid, '*', '*', na->GetVhostHost().empty() ? "*" : na->GetVhostHost(), na->nc->display);
|
||||
Uplink::Send("ENCAP", s ? s->GetName() : uid.substr(0, 3), "SVSLOGIN", uid, '*', '*', na->GetVHostHost().empty() ? "*" : na->GetVHostHost(), na->nc->display);
|
||||
}
|
||||
|
||||
void SendSVSNOOP(const Server *server, bool set) override
|
||||
|
||||
@@ -141,14 +141,14 @@ public:
|
||||
Uplink::Send("ENCAP", '*', "NICKDELAY", 0, nick);
|
||||
}
|
||||
|
||||
void SendVhost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
void SendVHost(User *u, const Anope::string &ident, const Anope::string &host) override
|
||||
{
|
||||
Uplink::Send("ENCAP", '*', "CHGHOST", u->GetUID(), host);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
this->SendVhost(u, "", u->host);
|
||||
this->SendVHost(u, "", u->host);
|
||||
}
|
||||
|
||||
void SendSASLMessage(const SASL::Message &message) override
|
||||
@@ -166,8 +166,8 @@ public:
|
||||
Server *s = Server::Find(uid.substr(0, 3));
|
||||
|
||||
Uplink::Send("ENCAP", s ? s->GetName() : uid.substr(0, 3), "SVSLOGIN", uid, '*',
|
||||
na && !na->GetVhostIdent().empty() ? na->GetVhostIdent() : '*',
|
||||
na && !na->GetVhostHost().empty() ? na->GetVhostHost() : '*',
|
||||
na && !na->GetVHostIdent().empty() ? na->GetVHostIdent() : '*',
|
||||
na && !na->GetVHostHost().empty() ? na->GetVHostHost() : '*',
|
||||
na ? na->nc->display : "0");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
Uplink::Send(bi, "PRIVMSG", "$" + dest->GetName(), msg);
|
||||
}
|
||||
|
||||
void SendVhostDel(User *u) override
|
||||
void SendVHostDel(User *u) override
|
||||
{
|
||||
BotInfo *HostServ = Config->GetClient("HostServ");
|
||||
u->RemoveMode(HostServ, "VHOST");
|
||||
@@ -199,10 +199,10 @@ private:
|
||||
|
||||
/* Functions that use serval cmd functions */
|
||||
|
||||
void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) override
|
||||
void SendVHost(User *u, const Anope::string &vident, const Anope::string &vhost) override
|
||||
{
|
||||
if (!vIdent.empty())
|
||||
Uplink::Send("CHGIDENT", u->GetUID(), vIdent);
|
||||
if (!vident.empty())
|
||||
Uplink::Send("CHGIDENT", u->GetUID(), vident);
|
||||
|
||||
if (!vhost.empty())
|
||||
Uplink::Send("CHGHOST", u->GetUID(), vhost);
|
||||
@@ -411,11 +411,11 @@ private:
|
||||
|
||||
if (na)
|
||||
{
|
||||
if (!na->GetVhostIdent().empty())
|
||||
Uplink::Send("CHGIDENT", uid, na->GetVhostIdent());
|
||||
if (!na->GetVHostIdent().empty())
|
||||
Uplink::Send("CHGIDENT", uid, na->GetVHostIdent());
|
||||
|
||||
if (!na->GetVhostHost().empty())
|
||||
Uplink::Send("CHGHOST", uid, na->GetVhostHost());
|
||||
if (!na->GetVHostHost().empty())
|
||||
Uplink::Send("CHGHOST", uid, na->GetVHostHost());
|
||||
}
|
||||
|
||||
Uplink::Send("SVSLOGIN", distmask, uid, na ? na->nc->display : "0");
|
||||
|
||||
@@ -21,8 +21,8 @@ bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::
|
||||
WebPanel::RunCommand(client, na->nc->display, na->nc, "HostServ", "hostserv/request", params, replacements, "CMDR");
|
||||
}
|
||||
|
||||
if (na->HasVhost())
|
||||
replacements["VHOST"] = na->GetVhostMask();
|
||||
if (na->HasVHost())
|
||||
replacements["VHOST"] = na->GetVHostMask();
|
||||
if (ServiceReference<Command>("Command", "hostserv/request"))
|
||||
replacements["CAN_REQUEST"] = "YES";
|
||||
TemplateFileServer page("hostserv/request.html");
|
||||
|
||||
@@ -80,8 +80,8 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str
|
||||
if (!na->nc->email.empty())
|
||||
replacements["EMAIL"] = na->nc->email;
|
||||
replacements["TIME_REGISTERED"] = Anope::strftime(na->time_registered, na->nc);
|
||||
if (na->HasVhost())
|
||||
replacements["VHOST"] = na->GetVhostMask();
|
||||
if (na->HasVHost())
|
||||
replacements["VHOST"] = na->GetVHostMask();
|
||||
Anope::string *greet = na->nc->GetExt<Anope::string>("greet");
|
||||
if (greet)
|
||||
replacements["GREET"] = *greet;
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
s.name = HostServ->nick;
|
||||
|
||||
SubSection ss;
|
||||
ss.name = "vHost Request";
|
||||
ss.name = "VHost Request";
|
||||
ss.url = "/hostserv/request";
|
||||
s.subsections.push_back(ss);
|
||||
provider->RegisterPage(&this->hostserv_request);
|
||||
|
||||
+17
-17
@@ -76,7 +76,7 @@ NickAlias::~NickAlias()
|
||||
NickAliasList->erase(this->nick);
|
||||
}
|
||||
|
||||
void NickAlias::SetVhost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created)
|
||||
void NickAlias::SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created)
|
||||
{
|
||||
this->vhost_ident = ident;
|
||||
this->vhost_host = host;
|
||||
@@ -84,7 +84,7 @@ void NickAlias::SetVhost(const Anope::string &ident, const Anope::string &host,
|
||||
this->vhost_created = created;
|
||||
}
|
||||
|
||||
void NickAlias::RemoveVhost()
|
||||
void NickAlias::RemoveVHost()
|
||||
{
|
||||
this->vhost_ident.clear();
|
||||
this->vhost_host.clear();
|
||||
@@ -92,35 +92,35 @@ void NickAlias::RemoveVhost()
|
||||
this->vhost_created = 0;
|
||||
}
|
||||
|
||||
bool NickAlias::HasVhost() const
|
||||
bool NickAlias::HasVHost() const
|
||||
{
|
||||
return !this->vhost_host.empty();
|
||||
}
|
||||
|
||||
const Anope::string &NickAlias::GetVhostIdent() const
|
||||
const Anope::string &NickAlias::GetVHostIdent() const
|
||||
{
|
||||
return this->vhost_ident;
|
||||
}
|
||||
|
||||
const Anope::string &NickAlias::GetVhostHost() const
|
||||
const Anope::string &NickAlias::GetVHostHost() const
|
||||
{
|
||||
return this->vhost_host;
|
||||
}
|
||||
|
||||
Anope::string NickAlias::GetVhostMask() const
|
||||
Anope::string NickAlias::GetVHostMask() const
|
||||
{
|
||||
if (this->GetVhostIdent().empty())
|
||||
return this->GetVhostHost();
|
||||
if (this->GetVHostIdent().empty())
|
||||
return this->GetVHostHost();
|
||||
|
||||
return this->GetVhostIdent() + "@" + this->GetVhostHost();
|
||||
return this->GetVHostIdent() + "@" + this->GetVHostHost();
|
||||
}
|
||||
|
||||
const Anope::string &NickAlias::GetVhostCreator() const
|
||||
const Anope::string &NickAlias::GetVHostCreator() const
|
||||
{
|
||||
return this->vhost_creator;
|
||||
}
|
||||
|
||||
time_t NickAlias::GetVhostCreated() const
|
||||
time_t NickAlias::GetVHostCreated() const
|
||||
{
|
||||
return this->vhost_created;
|
||||
}
|
||||
@@ -148,12 +148,12 @@ void NickAlias::Serialize(Serialize::Data &data) const
|
||||
data.SetType("last_seen", Serialize::Data::DT_INT); data["last_seen"] << this->last_seen;
|
||||
data["nc"] << this->nc->display;
|
||||
|
||||
if (this->HasVhost())
|
||||
if (this->HasVHost())
|
||||
{
|
||||
data["vhost_ident"] << this->GetVhostIdent();
|
||||
data["vhost_host"] << this->GetVhostHost();
|
||||
data["vhost_creator"] << this->GetVhostCreator();
|
||||
data["vhost_time"] << this->GetVhostCreated();
|
||||
data["vhost_ident"] << this->GetVHostIdent();
|
||||
data["vhost_host"] << this->GetVHostHost();
|
||||
data["vhost_creator"] << this->GetVHostCreator();
|
||||
data["vhost_time"] << this->GetVHostCreated();
|
||||
}
|
||||
|
||||
Extensible::ExtensibleSerialize(this, this, data);
|
||||
@@ -206,7 +206,7 @@ Serializable *NickAlias::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
data["vhost_creator"] >> vhost_creator;
|
||||
data["vhost_time"] >> vhost_time;
|
||||
|
||||
na->SetVhost(vhost_ident, vhost_host, vhost_creator, vhost_time);
|
||||
na->SetVHost(vhost_ident, vhost_host, vhost_creator, vhost_time);
|
||||
|
||||
Extensible::ExtensibleUnserialize(na, na, data);
|
||||
|
||||
|
||||
+2
-2
@@ -388,7 +388,7 @@ void User::Identify(NickAlias *na)
|
||||
{
|
||||
this->SendMessage(NULL, "Changing your vhost to \002%s\002", this->nc->o->vhost.c_str());
|
||||
this->SetDisplayedHost(this->nc->o->vhost);
|
||||
IRCD->SendVhost(this, "", this->nc->o->vhost);
|
||||
IRCD->SendVHost(this, "", this->nc->o->vhost);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -553,7 +553,7 @@ void User::SetModeInternal(const MessageSource &source, UserMode *um, const Anop
|
||||
{
|
||||
this->SendMessage(NULL, "Changing your vhost to \002%s\002", this->nc->o->vhost.c_str());
|
||||
this->SetDisplayedHost(this->nc->o->vhost);
|
||||
IRCD->SendVhost(this, "", this->nc->o->vhost);
|
||||
IRCD->SendVHost(this, "", this->nc->o->vhost);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user