Advertisement
by The Noble Thatcherites » Wed Oct 18, 2017 10:16 pm
Kanglia wrote:Thatcher. Wants. As. Little. To. Do. With. You. All. As. Possible.
Résumé
The Union of Democratic States
Citizen and Founder
Prime Minister (x1)
Motion(s) Passed (x15)
Ambassador (x21)
Publisher for The Union Post (x5)
Constitutional Framer (x4)
The Free Nations Region
Citizen and Legislator
Justice (x1)
Motion(s) Passed (1x)
The Allied States
Citizen
Senator (x1)
FORGE
Representative (x4)
Chancellor (x1)
ITDA
Founder
Representative (x1)
Secretary General (x1)
Charter Author (x2)
Court of International Law and Justice
Foreign Affairs Justice (x1)
Europeia
Citizen and Assemblyman (x1)
The South Pacific
Citizen
SPSF Recruit (x1)
by Mount Seymour » Thu Oct 19, 2017 1:53 pm
The Pacific Alpine Commonwealth of Mount Seymour
a.k.a. Somyrion, Aumeltopia
by Kylia Quilor » Thu Oct 19, 2017 4:22 pm
Consular wrote:Well I hope I don't need to point out to people that trusting an unknown actor with their founder is incredibly unwise.
by Escade » Thu Oct 19, 2017 6:44 pm
Mount Seymour wrote:Fwiw, this person is also the main leader of The Bear Country, and I believe is working on a region project as All Wild Things (possibly also is the current delegate of Christmas). I've known them for a while, and while not very apparent on the gameplay scene, they've done a lot of good work in smaller regions and have had lots of very creative ideas. They're on discord in Lily's main server, iirc.
by Reventus Koth » Sun Oct 22, 2017 12:55 am
Founder Succession
Many regions fall into difficulties due to their founder ceasing to exist. Founderless regions can be prone to raids. Wolfram and Hart offer a service to help avoid this. Founders can entrust their password to Wolfram and Hart, along with instructions as to how this should be used in the event that they CTE. Typically, the first step would be to revive the founder nation, then to entrust the password to an heir of the founder's choice.
Xanthal wrote:Only raiders can win in this war- a defender can keep them from winning one region, one update at a time, but there will always be the next region, the next update, and the next, forever.
by Consular » Sun Oct 22, 2017 2:48 am
by Wolfram and Hart » Sun Oct 22, 2017 4:10 pm
by Dysmastan » Sun Oct 22, 2017 5:42 pm
by The Grand Duchy Of Nova Capile » Sat Nov 04, 2017 1:01 pm
by Wolfram and Hart » Sat Nov 04, 2017 3:47 pm
The Grand Duchy Of Nova Capile wrote:OOC:
Not sure if this is still active, but if it is, I would be interested in getting someone to review my Constitution for any legal loopholes or things like that.
by Wolfram and Hart » Tue Nov 14, 2017 3:25 pm
by Wolfram and Hart » Tue Nov 14, 2017 3:26 pm
by Attorney Urquhart » Wed Nov 15, 2017 3:00 pm
Wolfram and Hart wrote:I spotted this thread, and as I'd been thinking of starting a Constitution Clinic, it seemed an ideal candidate for hijacking.
Link to The Keenland Powers constitution
The purpose is to look for contradictions, and any clauses that are unclear or redundant. Comments should address these issues only. Comments should not try to change the spirit of the original document.
I'll let the rest of the Wolfram and Hart legal team know, and we'll add commentary as we find the time.
by Wolfram and Hart » Wed Nov 15, 2017 3:07 pm
by Chricoma » Wed Nov 22, 2017 5:33 pm
by Attorney Urquhart » Fri Nov 24, 2017 11:12 am
Chricoma wrote:https://www.nationstates.net/page=dispatch/id=906163
The Constitution of the OEU, to be reviewed
We already approved it and it is law now but some insight would be nice
by Attorney Urquhart » Fri Nov 24, 2017 11:12 pm
Chricoma wrote:https://www.nationstates.net/page=dispatch/id=906163
The Constitution of the OEU, to be reviewed
We already approved it and it is law now but some insight would be nice
by Pergamon » Sat Nov 25, 2017 6:25 am
by Chricoma » Sat Nov 25, 2017 1:23 pm
Attorney Urquhart wrote:Chricoma wrote:https://www.nationstates.net/page=dispatch/id=906163
The Constitution of the OEU, to be reviewed
We already approved it and it is law now but some insight would be nice
The Constitution of the United Nations
of the Official European Union
Table of Articles
1. Bill of rights
2. OEU Regional Government
3. OEU Political Parties
4. OEU Parliament
5. OEU Government Officials
6. OEU criminal procedures
1. Bill of Rights
1. All nations are entitled to immediate citizenship*
2. All nations are entitled to rp freely within reason
3. All nations are free to run there nation as they please
4. All nations may join political partys and run in elections
5. All nations have a right to free speech within reason
6. All nations have a right to a fair trial
7. All nations have a right to sue other nations
8. All nations have the right to give their ideas on how the government should be run. If a nation has an idea for a new law, they can bring their request to their delegate who will bring it up at the next Parliamentary meeting.
*If previously banned from the OEU you must register for citizenship with the Minister of Defense
ANALYSIS OF BILL OF RIGHTS:
The * put by 1. about being previously banned needs clarification. If someone is banned how could they be allowed back into a Region? Keep in mind when you banject someone they are also listed on the Admin page and can't reenter a Region. This will need to be addressed I think. Also please check look at the inconsistencies this may have with your Penal/Legal/Sentencing codes.
On point 4 and all other point when you say "all nation's" do nation's require Citizenship to do something like for example run for an election? This needs stated I think.
Point 8 is a little confusing and is somewhat contrary to the rest of the document. I don't know that simply proposing legislation through a Delegate should be put into a Bill of Rights.
2. OEU Regional Government
-Consists of many different political parties
-Consists of a Parliament. The OEU Parliament consists of two houses. The house of Delegates and the Senate
-Consists of five Regional officers, four of which are voted for
-Consists of a Supreme Court ran by a Head Justice
3. OEU Political Parties
-All Nations may join a political party if they meet the parties requirements
-All Nations may form their own party
-Parties are eligible to be represented in Parliament if they have at least two members
-By joining a party, you are eligible to run in elections or attend the OEU parliament.
-The leader of a party with the most members becomes the Prime Minister
-Parties may be ran at the leaders own discretion
-It is the Parties job to choose their Delegates and Senators
4. OEU Parliament
-The Parliament is made up of the House of Delegates and the Senate
The House of Delegates
The House of Delegates will be made up of delegates from each party. For every three people in a party there will be one appointed delegate in the house for that party. The delegates in the parliament will make the bills that the nations of the OEU bring up. The Chancellor of the OEU will act as the head of the House of Delegates and is responsible for holding meetings where the law making process will take place. At one such meeting, if a bill is successfully aggreed upon by majority rule ,then the bill must be passed by the Senate.
The Senate
The Senate will consist of two members from each party. The Senates job is to anylize any bill passed by the House of Delegates. Once the house passes a bill to the Senate, the Senate has the ability to officially make the bill a law with a majority vote. If the bill is approved by the Senate, then the Prime Minister can make it an official law. The Prime Minister will act as head of the Senate and is responsible for holding frequent meetings.
ANALYSIS OF OEU PARLIAMENT:
I can't really find anything wrong with this section. You did misspell "analyize" under to the Senate section.
5. OEU Regional Officers
-The OEU Regional Officers are made up of 5 different officials each having there own responsibility.
-Any and all of these officers can be impeached if there is failure in preforming there duties. Impeachment may be brought up by any nation to the Founder or Chancellor who will bring the accusations to the Senate. The Senate will be responsible for holding a vote where if 2/3 vote impeachment, the officer will be relieved of his or her duties.
Founder
-Founder of the OEU
-Has executive Authority
-The ONLY nation who may hold two officer positions. (Both being Founder and a different officer position)
-May NOT abuse the Executive power
Prime Minister
-The leader of the Senate and is responsible for holding frequent meetings
-Has authority to appoint Chancellor
-The Prime Minister is appointed by the party with the most members
-The Prime Minister has power to appoint temporary Officers
-The Prime Minister has veto power
-The Prime Minister has the power to quickly and effectively eject nations that are known threats to the region or other nations
-The Prime Minister has the power to declare war
-The Prime Minister is allowed to create quick and effective legislation within reason in times of national emergency
-The Prime Minister has the power to declare a National Emergency.
-Controls Border control, communications, polls, appearance, and embassies.
ANALYSIS OF PRIME MINISTER:
When you say that the Prime Minister may appointment Temporary Officers, what is a Temporary Officer? Are they simply meant to fill a vacancy or meant for a temporary agency?
Also on the point of "quick and effective legislation" do you mean he can create law entirely with out the legislative branch?
That's something a court would have trouble with I think.
Chancellor
-Appointed by the Prime Minister
-Leader of the House of Delegates and is responsible for holding frequent meetings.
-Is next in command and has the authority to carry out the Prime Ministers jobs if the Prime Minister is unable to do so
-Can carry out quick and efficient ejections of nations that are known threats to the region or other nations
-Has the power to give awards and honorary ceremonies to nations that have preformed a good deed to the region.
-Controls Border control, communications, polls, appearance and embassies
Minister of Defense
-The Minister of Defense is responsible to moniter potential threats to the region
-The Minister of Defense has the power to eject a nation known to be a threat quickly and efficiently.
-Elected every month*
-Can declare war if the circumstances call for quick and immediate action
-Controls Border Control, Communications, embassies
ANALYSIS OF DEFENSE:
Misspelled "monitor". Also what is meant by monitor? Is there an intelligence agency involved or just monitoring in general?
WA Delegate
-The WA delegate is responsible for representing the OEU in the world assembly
-The WA delegate is responsible for administering foreign embassies.
-The WA delegate is the ambassador to the OEU and therefore must be active in International affairs
-Controls WA power and embassies
-Elected through endorsements
ANALYSIS OF WA Delegate:
Under 1. You say "representing" but a lot of Regions have a voting law or some other requirement for the Delegate. Perhaps this should be given more detail and procedure.
Head Justice
-In charge of the Supreme court
-May call forth new amendments to the Constitution
-May rule any laws unconstitutional and therefore making the law non-existant. (Parliament may overturn the unconstitutional ruling with 2/3 vote from each house
-The Head judge when dealing with criminal cases and lawsuits
-Voted into position every month and a half
ANALYSIS OF HEAD JUSTICE:
In my opinion you should leave amendments to the legislative branch. It's better to keep a judge out of direct politics for a more impartial judicial system.
The OEU Government
-Executive: Carrys out laws, can veto laws. Prime Minister
-Parliament: Makes the laws. Senate and House of Delegates
-Supreme court: Interprets the laws. Head Justice
6. Criminal procedures
-Unless somone is found an immediate threat they CANNOT be ejected or banned without a fair trial
-If they do not oblige to the trial within 24 hours then they may be ejected without trial
-The trial will be judged by the head Justice
-In a trial, the prosecutor (which may be a government officer) must state his claim. Your are INNOCENT untill proven guilty
-If found innocent you will be freed without question
-If found guilty, the Head Justice will apply punishment which may result in expulsion
ANALYSIS OF CRIMINAL PROCEDURE:
The second point about not obliging needs fixed. If you mean not obliging in the sense that the Defendant won't enter a Guilty or Not Guilty plea then there is a procedure called Standing Mute. The Court enters this plea on behalf of the Defendant if they refuse to plea. It has the effect of a Not Guilty plea and the case automatically goes to trial.
Also I noticed there is no stated burden of proof for the prosecutor. It should be beyond a reasonable doubt.
Finally, under the point on applying punishment I think there should be some sort of sentencing code or guide line giving the judge a minimum and maximum sentencing range. Otherwise the judge has to much push and pull which may violate impartiality.
------------------------------------------------------------------------------
Please note that this is only my independent analysis of your query and does not represent all of the possible differing legal opinions of the law firm.
-James Urquhart, Esquire
by Wolfram and Hart » Mon Nov 27, 2017 12:02 am
by Chricoma » Mon Nov 27, 2017 5:28 pm
Wolfram and Hart wrote:The Constitution of the OEU
[center]The Constitution of the United Nations
of the Official European Union[/center]Table of Articles
1. Bill of rights
2. OEU Regional Government
3. OEU Political Parties
4. OEU Parliament
5. OEU Government Officials
6. OEU criminal procedures
1. Bill of Rights
1. All nations are entitled to immediate citizenship*
2. All nations are entitled to rp freely within reason
WH: How will “within reason” be defined / judged?
3. All nations are free to run there nation as they please
4. All nations may join political partys and run in elections
5. All nations have a right to free speech within reason
WH: How will “within reason” be defined / judged?
6. All nations have a right to a fair trial
7. All nations have a right to sue other nations
8. All nations have the right to give their ideas on how the government should be run. If a nation has an idea for a new law, they can bring their request to their delegate who will bring it up at the next Parliamentary meeting.
*If previously banned from the OEU you must register for citizenship with the Minister of Defense
2. OEU Regional Government
-Consists of many different political parties
WH: I don't think it's necessary to mention political parties in this section.
-Consists of a Parliament. The OEU Parliament consists of two houses. The house of Delegates and the Senate
-Consists of five Regional officers, four of which are voted for
WH: I'm not convinced. The Founder is permanent. The Prime Minister isn’t really elected - they're an appointment of the largest party. The Chancellor isn't elected, they're chosen by the Prime Minister. The WA delegate is elected via endorsements, meaning that a raider can easily take this position.
-Consists of a Supreme Court ran by a Head Justice
WH: I think I would have found this constitution easier to understand if it was in a different order. To me, section 5 belongs before 4,belongs before 3.
3. OEU Political Parties
-All Nations may join a political party if they meet the parties requirements
WH: party’s.
-All Nations may form their own party
-Parties are eligible to be represented in Parliament if they have at least two members
-By joining a party, you are eligible to run in elections or attend the OEU parliament.
WH: ... provided there are at least two members?
-The leader of a party with the most members becomes the Prime Minister
WH: And if there is a tie?
-Parties may be ran at the leaders own discretion
-It is the Parties job to choose their Delegates and Senators
4. OEU Parliament
-The Parliament is made up of the House of Delegates and the Senate
The House of Delegates
The House of Delegates will be made up of delegates from each party. For every three people in a party there will be one appointed delegate in the house for that party.
WH: So with only two party members, you don't get a delgate?
The delegates in the parliament will make the bills that the nations of the OEU bring up. The Chancellor of the OEU will act as the head of the House of Delegates and is responsible for holding meetings where the law making process will take place. At one such meeting, if a bill is successfully aggreed upon by majority rule ,then the bill must be passed by the Senate.
WH: "must be passed”. So if there's a majority in the Delegates, then it doesn't need to be approved by the Senate.
The Senate
The Senate will consist of two members from each party.
WH: So with only two party members, you don't get a delgate, as both will be senators.
The Senates job is to anylize any bill passed by the House of Delegates. Once the house passes a bill to the Senate, the Senate has the ability to officially make the bill a law with a majority vote.
WH: ...unless it already got a majority vote by the delegates.
If the bill is approved by the Senate, then the Prime Minister can make it an official law. The Prime Minister will act as head of the Senate and is responsible for holding frequent meetings.
WH: How frequent?
5. OEU Regional Officers
-The OEU Regional Officers are made up of 5 different officials each having there own responsibility.
-Any and all of these officers can be impeached if there is failure in preforming there duties. Impeachment may be brought up by any nation to the Founder or Chancellor who will bring the accusations to the Senate. The Senate will be responsible for holding a vote where if 2/3 vote impeachment, the officer will be relieved of his or her duties.
WH: their duties
Founder
-Founder of the OEU
-Has executive Authority
-The ONLY nation who may hold two officer positions. (Both being Founder and a different officer position)
-May NOT abuse the Executive power
Prime Minister
-The leader of the Senate and is responsible for holding frequent meetings
-Has authority to appoint Chancellor
-The Prime Minister is appointed by the party with the most members
-The Prime Minister has power to appoint temporary Officers
WH: How will that work in practice?
-The Prime Minister has veto power
-The Prime Minister has the power to quickly and effectively eject nations that are known threats to the region or other nations
-The Prime Minister has the power to declare war
-The Prime Minister is allowed to create quick and effective legislation within reason in times of national emergency
-The Prime Minister has the power to declare a National Emergency.
-Controls Border control, communications, polls, appearance, and embassies.
WH: I think it would be helpful to put this list of powers close to the top of the job description
Chancellor
-Appointed by the Prime Minister
-Leader of the House of Delegates and is responsible for holding frequent meetings.
-Is next in command and has the authority to carry out the Prime Ministers jobs if the Prime Minister is unable to do so
-Can carry out quick and efficient ejections of nations that are known threats to the region or other nations
-Has the power to give awards and honorary ceremonies to nations that have preformed a good deed to the region.
-Controls Border control, communications, polls, appearance and embassies
Minister of Defense
-The Minister of Defense is responsible to moniter potential threats to the region
-The Minister of Defense has the power to eject a nation known to be a threat quickly and efficiently.
-Elected every month*
WH: What is the process for elections?
-Can declare war if the circumstances call for quick and immediate action
-Controls Border Control, Communications, embassies
WA Delegate
-The WA delegate is responsible for representing the OEU in the world assembly
-The WA delegate is responsible for administering foreign embassies.
-The WA delegate is the ambassador to the OEU and therefore must be active in International affairs
WH: for the OEU
-Controls WA power and embassies
WH: Careful how this is enacted. In theory, raiders could close embassies
-Elected through endorsements
Head Justice
-In charge of the Supreme court
-May call forth new amendments to the Constitution
WH: Do these amendments need approval by anyone?
-May rule any laws unconstitutional and therefore making the law non-existant. (Parliament may overturn the unconstitutional ruling with 2/3 vote from each house
WH: Are they required to say why they believe a law is unconstitutional?
-The Head judge when dealing with criminal cases and lawsuits
-Voted into position every month and a half
WH: What is the process for elections?
The OEU Government
-Executive: Carrys out laws, can veto laws. Prime Minister
-Parliament: Makes the laws. Senate and House of Delegates
-Supreme court: Interprets the laws. Head Justice
6. Criminal procedures
-Unless somone is found an immediate threat they CANNOT be ejected or banned without a fair trial
-If they do not oblige to the trial within 24 hours then they may be ejected without trial
-The trial will be judged by the head Justice
-In a trial, the prosecutor (which may be a government officer) must state his claim. Your are INNOCENT untill proven guilty
WH: “may be” or “must be”?
-If found innocent you will be freed without question
WH: Maybe use “not guilty”. The previous clause assumes innocence
-If found guilty, the Head Justice will apply punishment which may result in expulsion
by Wolfram and Hart » Tue Nov 28, 2017 2:03 pm
Pergamon wrote:Really, this is an amazing idea. However, I doubt we will be interacting at all.
by Wolfram and Hart » Tue Dec 05, 2017 1:47 pm
<!DOCTYPE html>
<!-- Wolfram & Hart Puppet Login Script v1.0
Version | Date | Name | Comment
1.0 | 04 Dec 2017 | Wolfram & Hart | Created
This code is not warranted in any way. Use at your own risk.
Use and modify this code as suits.
Make sure you comply with the NationStates API rules.
See: https://www.nationstates.net/pages/api.html
Don't use this code to log in more than 25 puppets in 30 seconds.
(That would break NationStates API rules, as at the time of writing).
-->
<head>
<!-- Set the title, visible in the browser tab -->
<title>W&H Puppet Login</title>
<!-- Set the colour scheme and format for the page -->
<style>
body {background-color: black;}
div {
text-align:center;
color: white;
font-family: times;
}
</style>
</head>
<body>
<div>
<!-- Display headers. Use <span> tags to format the "W", "&", and "H" in "Wolfram & Hart". -->
<h1><span style="font-size:120%;">W</span>OLFRAM <span style="color:red; font-size:120%;">&</span> <span style="font-size:120%;">H</span>ART</h1>
<h3>Puppet Login</h3>
<!-- Add a blank line -->
<br>
<!-- Add a button. When clicked, this will run the JavaScript code -->
<button type="button" onclick="fLoginAll()">Login</button>
<!-- Add an empty paragraph, ready to display results -->
<p id="result"></p>
</div>
<!-- This is the JavaScript that will be run when the button is pressed -->
<script>
/* **********************CHANGE THIS TO USE YOUR OWN EMAIL ADDRESS********************** */
/* NationStates require a 'UserAgent', so you can be contacted if something goes wrong */
var strUserAgent = "myname@email.com"
/* ************************************************************************************* */
/* Tell NS the format of the password. This code uses the unencrypted text password.
(The one you type into the NationStates website). NS allows you to use an encrypted
password instead. See this page for more details:
https://www.nationstates.net/pages/api.html#nationapi-privateshards
*/
var strPasswordType = "X-Password"
/* Set a variable to record the nations processed. This will update the html paragraph */
var strMessage = "";
/* ************CHANGE THIS TO INCLUDE UP TO 25 OF YOUR NATIONS AND PASSWORDS*********** */
/* This function calls the fLogin function (below) for each nation / password pair.
You can have up to 25 nations here without breaking NS API rules */
function fLoginAll() {
fLogin("Nation 1", "Password1")
fLogin("Nation 2", "Password2")
fLogin("Nation 3", "Password3")
fLogin("Nation 4", "Password4")
}
/* ************************************************************************************* */
/* This function uses AJAX to 'ping' (login) each nation, and records if the ping worked. */
function fLogin(strNation, strPassword) {
/* Create an object to send the login details to NS */
var xhttp = new XMLHttpRequest();
/* Set the object to update the html paragraph when it gets a response from NS */
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
strMessage = strMessage+"<br>" + strNation + ": " + xhttp.status;
if (xhttp.status == 200) {
strMessage = strMessage + ": OK";
} else if (xhttp.status == 403) {
strMessage = strMessage + ": Forbidden (incorrect password?)";
} else if (xhttp.status == 404) {
strMessage = strMessage + ": Not Found (nation doesn't exist?)";
} else if (xhttp.status == 429) {
strMessage = strMessage + ": Exceeding Rate Limit (max 25 nations every 30 seconds)";
}
document.getElementById("result").innerHTML = strMessage;
}
};
/* Tell the object which nation URL to log in to.
Replace any space characters in the nation name (" ") with underlines ("_")
Tell it the password.
Tell it your contact details.
Send the request to NS.
*/
xhttp.open("GET", "https://www.nationstates.net/cgi-bin/api.cgi?nation="+strNation.replace(" ", "_")+"&q=ping", true);
xhttp.setRequestHeader(strPasswordType, strPassword)
xhttp.setRequestHeader("User-Agent", strUserAgent)
xhttp.send();
}
</script>
</body>
</html>
<!DOCTYPE html>
<!-- Wolfram & Hart Puppet Login Script v1.2
Version | Date | Name | Comment
1.0 | 04 Dec 2017 | Wolfram & Hart | Created
1.2 | 16 Dec 2017 | Wolfram & Hart | Changes following Roavin's advice:
| | | Put nation / password pairs into an array.
| | | Included 'setTimeout()' in fLogin function
| | | to leave suitable gap between logins.
| | | Other minor changes.
This code is not warranted in any way. Use at your own risk.
Use and modify this code as suits.
Make sure you comply with the NationStates API rules.
See: https://www.nationstates.net/pages/api.html
-->
<head>
<!-- Set the title, visible in the browser tab -->
<title>W&H Puppet Login</title>
<!-- Set the colour scheme and format for the page -->
<style>
body {background-color: black;}
div {
text-align:center;
color: white;
font-family: times;
}
</style>
</head>
<body>
<div>
<!-- Display headers. Use <span> tags to format the "W", "&", and "H" in "Wolfram & Hart". -->
<h1><span style="font-size:120%;">W</span>OLFRAM <span style="color:red; font-size:120%;">&</span> <span style="font-size:120%;">H</span>ART</h1>
<h3>Puppet Login</h3>
<!-- Add a blank line -->
<br>
<!-- Add a button. When clicked, this will run the JavaScript function, "fMain" -->
<button type="button" onclick="fMain()">Login</button>
<!-- Add an empty paragraph, ready to display results -->
<p id="result"></p>
</div>
<!-- This is the JavaScript that will be run when the button is pressed -->
<script>
/* **********************CHANGE THIS TO USE YOUR OWN EMAIL ADDRESS********************** */
/* NationStates require a 'UserAgent', so you can be contacted if something goes wrong */
var strUserAgent = "myname@email.com";
/* ************************************************************************************* */
/* ***************CHANGE THIS ARRAY TO INCLUDE YOUR NATIONS AND PASSWORDS*************** */
var aobjNations = [
{nation:"Nation 1", password:"Password1"},
{nation:"Nation 2", password:"Password2"},
{nation:"Nation 3", password:"Password3"},
{nation:"Last Nation", password:"LastPassword"}
];
/* ************************************************************************************* */
/* Tell NS the format of the password. This code uses the unencrypted text password.
(The one you type into the NationStates website). NS allows you to use an encrypted
password instead. See this page for more details:
https://www.nationstates.net/pages/api.html#nationapi-privateshards
*/
var strPasswordType = "X-Password";
/* Set a variable to record the nations processed. This will update the html paragraph. */
var strMessage = "";
/* The fMain function resets the 'results' paragraph to being blank.
It then tells the code to login the first nation in the list (position 0)
*/
function fMain() {
strMessage = "";
document.getElementById("result").innerHTML = "";
fLogin(0);
}
/* The fLogin function uses AJAX to 'ping' (login) each nation, and records if the ping worked.
intNation is a number indicating which nation in the array is being processed.
A value of 0 indicates the first nation in the array.
*/
function fLogin(intNation) {
/* If there are still nations to be processed, then process them */
if (intNation < aobjNations.length) {
/* get the nation name & password from the list */
var strNation = aobjNations[intNation].nation;
var strPassword = aobjNations[intNation].password;
/* Create an object to send the login details to NS */
var objXhttp = new XMLHttpRequest();
/* Set the object to update the html paragraph when it gets a response from NS
When a response is received, update the paragraph. Then wait 1200ms (1.2 seconds)
before logging in the next nation. That allows up to 25 nations to be logged in
in 30 seconds.
*/
objXhttp.onreadystatechange = function() {
if (objXhttp.readyState == 4) {
if (objXhttp.status == 200) {
strMessage = strMessage + "<br>" + strNation + ": OK";
setTimeout(function(){ fLogin(intNation + 1) }, 1200);
} else if (objXhttp.status == 403) {
strMessage = strNation + ": Forbidden (incorrect password?)<br>" + strMessage;
setTimeout(function(){ fLogin(intNation + 1) }, 1200);
} else if (objXhttp.status == 404) {
strMessage = strNation + ": Not Found (nation CTEd / misspelled / doesn't exist?)<br>" + strMessage;
setTimeout(function(){ fLogin(intNation + 1) }, 1200);
} else if (objXhttp.status == 429) {
strMessage = strNation + ": Too Many Requests. Processing stopped<br>" + strMessage;
} else {
strMessage = strNation + ": Error " + objXhttp.status + "<br>" + strMessage;
setTimeout(function(){ fLogin(intNation + 1) }, 1200);
}
document.getElementById("result").innerHTML = strMessage;
}
};
/* Tell the object which nation URL to log in to.
Replace any space characters in the nation name (" ") with underlines ("_")
Tell it the password.
Tell it your contact details.
Send the request to NS.
*/
objXhttp.open("GET", "https://www.nationstates.net/cgi-bin/api.cgi?nation="+strNation.replace(" ", "_")+"&q=ping", true);
objXhttp.setRequestHeader(strPasswordType, strPassword)
objXhttp.setRequestHeader("User-Agent", strUserAgent)
objXhttp.send();
} else {
strMessage = "Processing Complete<br>" + strMessage;
document.getElementById("result").innerHTML = strMessage;
}
}
</script>
</body>
</html>
<!DOCTYPE html>
<!-- Wolfram & Hart PuppetMaster v1.4
Version | Date | Name | Comment
1.0 | 04 Dec 2017 | Wolfram & Hart | Created
1.2 | 16 Dec 2017 | Wolfram & Hart | Changes following Roavin's advice:
| | | Put nation / password pairs into an array.
| | | Included 'setTimeout()' in fGetXml function
| | | to leave suitable gap between logins.
| | | Other minor changes.
1.4 | 12 Feb 2018 | Wolfram & Hart | NS query now returns the WA status, region, and number of unread issues, TGs etc
| | | Output is now to a table instead of paragraph.
| | | WA nation is listed first, followed by nations in the Rejected Realms
This code is not warranted in any way. Use at your own risk.
Use and modify this code as suits.
Make sure you comply with the NationStates API rules.
See: https://www.nationstates.net/pages/api.html
-->
<head>
<title>W&H PuppetMaster</title>
<style>
body {background-color: black;}
div {
text-align: center;
color: white;
font-family: times;
}
table,th,td {
border : 1px solid white;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
</head>
<body>
<div>
<h1><span style="font-size:120%;">W</span>OLFRAM <span style="color:red; font-size:120%;">&</span> <span style="font-size:120%;">H</span>ART</h1>
<h3>PuppetMaster</h3>
<br>
<button type="button" onclick="fMain()">View Puppets</button>
<p id="err"></p>
<table id="msg" align=center></table>
</div>
<!-- This is the JavaScript that will be run when the button is pressed -->
<script>
/* **********************CHANGE THIS TO USE YOUR OWN EMAIL ADDRESS********************** */
/* NationStates require a 'UserAgent', so you can be contacted if something goes wrong */
var strUserAgent = "myname@email.com";
/* ************************************************************************************* */
/* ***************CHANGE THIS ARRAY TO INCLUDE YOUR NATIONS AND PASSWORDS*************** */
var aobjNtns = [
{nation:"Nation 1", password:"Password1"},
{nation:"Nation 2", password:"Password2"},
{nation:"Nation 3", password:"Password3"},
{nation:"Last Nation", password:"LastPassword"}
];
/* ************************************************************************************* */
/* Tell NS the format of the password. This code uses the unencrypted text password.
(The one you type into the NationStates website). NS allows you to use an encrypted
password instead. See this page for more details:
https://www.nationstates.net/pages/api.html#nationapi-privateshards
*/
var strPasswordType = "X-Password";
/* Set variables to record the nations processed. This will update the html. */
var strErr;
var strWA;
var strTRR;
var strMsg;
var strHdr = "<tr><th>Nation</th><th>Region</th><th>Notices</th><th>Telegrams</th><th>RMB</th><th>Issues</th></tr>";
var intNtn = 0;
/* The fMain function resets the 'msg' table to being blank.
It then tells the code to login the first nation in the list.
*/
function fMain() {
strErr = "";
strWA = "";
strTRR = "";
strMsg = "";
document.getElementById("err").innerHTML = strErr;
document.getElementById("msg").innerHTML = strMsg;
fGetXml();
}
/* fGetXml checks if there is another nation to be processed, then requests the XML from NS */
function fGetXml() {
if (intNtn < aobjNtns.length) {
var strNtn = aobjNtns[intNtn].nation.replace(" ", "_"); // get the nation name & password from the list
var strPassword = aobjNtns[intNtn].password;
intNtn = intNtn + 1;
var objXhttp = new XMLHttpRequest(); // Create an object to send the details to NS
objXhttp.onreadystatechange = function() {
if (objXhttp.readyState == 2) {
setTimeout(function(){ fGetXml() }, 1200); // readyState == 2 means the request was received. Set the timer to send the next request.
} else if (objXhttp.readyState == 4) {
if (objXhttp.status == 200) {
fProcessXml(this);
} else {
if (objXhttp.status == 403) {
strErr = strNtn + ": Forbidden (incorrect password?)<br>" + strErr;
} else if (objXhttp.status == 404) {
strErr = strNtn + ": Not Found (nation CTEd / misspelled / doesn't exist?)<br>" + strErr;
} else if (objXhttp.status == 429) {
strErr = strNtn + ": Too Many Requests. Processing stopped<br>" + strErr;
} else {
strErr = strNtn + ": Error " + objXhttp.status + "<br>" + strErr;
};
document.getElementById("err").innerHTML = strErr;
};
};
};
objXhttp.open("GET", "https://www.nationstates.net/cgi-bin/api.cgi?nation=" + strNtn + "&q=wa+name+region+unread", true);
objXhttp.setRequestHeader(strPasswordType, strPassword);
objXhttp.setRequestHeader("User-Agent", strUserAgent);
objXhttp.send();
};
}
/* fProcess reads in the XML data. It puts any WA nation to the top of the output,
followed by any nations in the Rejected Realms, followed by all other nations.
*/
function fProcessXml(objXhttp) {
var objXML = objXhttp.responseXML;
var strNtn = objXML.getElementsByTagName("NAME")[0].childNodes[0].nodeValue;
var strRgn = objXML.getElementsByTagName("REGION")[0].childNodes[0].nodeValue;
var strNtc = objXML.getElementsByTagName("NOTICES")[0].childNodes[0].nodeValue;
if (strNtc == "0") { strNtc = ""; };
var strTGs = objXML.getElementsByTagName("TELEGRAMS")[0].childNodes[0].nodeValue;
if (strTGs == "0") { strTGs = ""; };
var strRMB = objXML.getElementsByTagName("RMB")[0].childNodes[0].nodeValue;
if (strRMB == "0") { strRMB = ""; };
var strIss = objXML.getElementsByTagName("ISSUES")[0].childNodes[0].nodeValue;
if (strIss == "0") { strIss = ""; };
var strTmp = strRgn + "</th><th>" + strNtc +
"</th><th>" + strTGs + "</th><th>" + strRMB + "</th><th>" + strIss + "</th></tr>"
if (objXML.getElementsByTagName("UNSTATUS")[0].childNodes[0].nodeValue != "Non-member") {
strWA = strWA + "<tr style='color:red;'><th>WA Member: " + strNtn + "</th><th>" + strTmp;
} else if (strRgn == "the Rejected Realms") {
strTRR = strTRR + "<tr><th>" + strNtn + "</th><th style='color:red;'>" + strTmp;
} else {
strMsg = strMsg + "<tr><th>" + strNtn + "</th><th>" + strTmp;
};
document.getElementById("msg").innerHTML = strHdr + strWA + strTRR + strMsg;
}
</script>
</body>
</html>
<!DOCTYPE html>
<!-- Wolfram & Hart PuppetMaster v1.6
Version | Date | Name | Comment
1.0 | 04 Dec 2017 | Wolfram & Hart | Created
1.2 | 16 Dec 2017 | Wolfram & Hart | Changes following Roavin's advice:
| | | Put nation / password pairs into an array.
| | | Included 'setTimeout()' in fGetXml function to leave suitable gap between logins.
| | | Other minor changes.
1.4 | 12 Feb 2018 | Wolfram & Hart | NS query now returns the WA status, region, and number of unread issues, TGs etc
| | | Output is now to a table instead of paragraph.
| | | WA nation is listed first, followed by nations in the Rejected Realms
1.6 | 20 Aug 2018 | Wolfram & Hart | Added 'fSetNextRequest()' to improve efficiency of request times
| | |
This code is not warranted in any way. Use at your own risk.
Use and modify this code as suits.
Make sure you comply with the NationStates API rules.
See: https://www.nationstates.net/pages/api.html
Feedback: If you use this script, please drop [nation]Wolfram & Hart[/nation] a telegram.
It would be interesting to know how widely this was used (if at all!)
Any suggestions for improvements and enhancements are welcome.
-->
<head>
<title>W&H PuppetMaster</title>
<style>
body {background-color: black;}
div {
text-align: center;
color: white;
font-family: times;
}
table,th,td {
border : 1px solid white;
border-collapse: collapse;
}
th,td {
padding: 5px;
}
</style>
</head>
<body>
<div>
<h1><span style="font-size:120%;">W</span>OLFRAM <span style="color:red; font-size:120%;">&</span> <span style="font-size:120%;">H</span>ART</h1>
<h3>PuppetMaster</h3>
<br>
<button type="button" onclick="fMain()">View Puppets</button>
<p id="err"></p>
<table id="msg" align=center></table>
</div>
<!-- This is the JavaScript that will be run when the button is pressed -->
<script>
/* **********************CHANGE THIS TO USE YOUR OWN EMAIL ADDRESS********************** */
/* NationStates require a 'UserAgent', so you can be contacted if something goes wrong */
var strUserAgent = "myname@email.com";
/* ************************************************************************************* */
/* ***************CHANGE THIS ARRAY TO INCLUDE YOUR NATIONS AND PASSWORDS*************** */
var aobjNtns = [
{nation:"Nation 1", password:"Password1"},
{nation:"Nation 2", password:"Password2"},
{nation:"Nation 3", password:"Password3"},
{nation:"Last Nation", password:"LastPassword"}
];
/* ************************************************************************************* */
/* Tell NS the format of the password. This code uses the unencrypted text password.
(The one you type into the NationStates website). NS allows you to use an encrypted
password instead. See this page for more details:
https://www.nationstates.net/pages/api.html#nationapi-privateshards
*/
var strPasswordType = "X-Password";
/* Set variables to record the nations processed. This will update the html. */
var strErr;
var strWA;
var strTRR;
var strMsg;
var strHdr = "<tr><th>Nation</th><th>Region</th><th>Notices</th><th>Telegrams</th><th>RMB</th><th>Issues</th></tr>";
var intNtn = 0;
/* NS can receive 25 requests in 30 seconds. Recording the times that NS receives the requests
enables us to send the latest request exactly 30 seconds after NS received the 25th-ago request.
*/
var adteTime = [];
/* The fMain function:
Initialises the adteTime array with values from 'now' to 24 seconds in the future.
Resets the 'msg' table to being blank.
Tells the code to login the first nation in the list.
*/
function fMain() {
var dteNow = new Date().getTime();
var i;
for (i = 0; i < 24; i++) {
adteTime[i] = dteNow + (i + 1) * 1200;
}
strErr = "";
strWA = "";
strTRR = "";
strMsg = "";
document.getElementById("err").innerHTML = strErr;
document.getElementById("msg").innerHTML = strMsg;
fGetXml();
}
/* fGetXml checks if there is another nation to be processed, then requests the XML from NS */
function fGetXml() {
if (intNtn < aobjNtns.length) {
var strNtn = aobjNtns[intNtn].nation.replace(" ", "_"); // get the nation name & password from the list
var strPassword = aobjNtns[intNtn].password;
intNtn = intNtn + 1;
var objXhttp = new XMLHttpRequest(); // Create an object to send the details to NS
objXhttp.onreadystatechange = function() {
if (objXhttp.readyState == 2) {
fSetNextRequest();
} else if (objXhttp.readyState == 4) {
if (objXhttp.status == 200) {
fProcessXml(this);
} else {
if (objXhttp.status == 403) {
strErr = strNtn + ": Forbidden (incorrect password?)<br>" + strErr;
} else if (objXhttp.status == 404) {
strErr = strNtn + ": Not Found (nation CTEd / misspelled / doesn't exist?)<br>" + strErr;
} else if (objXhttp.status == 429) {
strErr = strNtn + ": Too Many Requests. Processing stopped<br>" + strErr;
} else {
strErr = strNtn + ": Error " + objXhttp.status + "<br>" + strErr;
};
document.getElementById("err").innerHTML = strErr;
};
};
};
objXhttp.open("GET", "https://www.nationstates.net/cgi-bin/api.cgi?nation=" + strNtn + "&q=wa+name+region+unread", true);
objXhttp.setRequestHeader(strPasswordType, strPassword);
objXhttp.setRequestHeader("User-Agent", strUserAgent);
objXhttp.send();
};
}
/* fSetNextRequest adds an entry to the end of adteTime, set for 30 seconds from now.
It then looks at the entry recorded for the 25th-ago request, to set up when the next request should go.
*/
function fSetNextRequest() {
var intDly;
var dteNow = new Date().getTime();
adteTime.push(dteNow + 30000);
intDly = adteTime.shift() - dteNow;
if (intDly < 0) { intDly = 1; };
setTimeout(function(){ fGetXml() }, intDly);
}
/* fProcess reads in the XML data. It puts any WA nation to the top of the output,
followed by any nations in the Rejected Realms, followed by all other nations.
*/
function fProcessXml(objXhttp) {
var objXML = objXhttp.responseXML;
var strNtn = objXML.getElementsByTagName("NAME")[0].childNodes[0].nodeValue;
var strRgn = objXML.getElementsByTagName("REGION")[0].childNodes[0].nodeValue;
var strNtc = objXML.getElementsByTagName("NOTICES")[0].childNodes[0].nodeValue;
if (strNtc == "0") { strNtc = ""; };
var strTGs = objXML.getElementsByTagName("TELEGRAMS")[0].childNodes[0].nodeValue;
if (strTGs == "0") { strTGs = ""; };
var strRMB = objXML.getElementsByTagName("RMB")[0].childNodes[0].nodeValue;
if (strRMB == "0") { strRMB = ""; };
var strIss = objXML.getElementsByTagName("ISSUES")[0].childNodes[0].nodeValue;
if (strIss == "0") { strIss = ""; };
var strTmp = strRgn + "</th><th>" + strNtc +
"</th><th>" + strTGs + "</th><th>" + strRMB + "</th><th>" + strIss + "</th></tr>"
if (objXML.getElementsByTagName("UNSTATUS")[0].childNodes[0].nodeValue != "Non-member") {
strWA = strWA + "<tr style='color:red;'><th>WA Member: " + strNtn + "</th><th>" + strTmp;
} else if (strRgn == "the Rejected Realms") {
strTRR = strTRR + "<tr><th>" + strNtn + "</th><th style='color:red;'>" + strTmp;
} else {
strMsg = strMsg + "<tr><th>" + strNtn + "</th><th>" + strTmp;
};
document.getElementById("msg").innerHTML = strHdr + strWA + strTRR + strMsg;
}
</script>
</body>
</html>
by Queen Yuno » Tue Dec 05, 2017 7:24 pm
Wolfram and Hart wrote:Puppet Login Script
Edit: Seems my code is dodgy, and each nation counts as two hits to NS. We're allowed 50 hits per 30 seconds, or else we get blocked for 15 mins. Until I can figure out how to make a nation count as only one hit, this code should be used for a max of 25 nations.
What
Use this code to log in to a list of your puppets with the push of one button. Handy to stop them CTEing!
How
On your PC or laptop, open a text editor, like Notepad. Copy the code (below) into the editor.
Put your own email address in the code (place indicated by all the asterisks).
Put your own Nation names and passwords in the code (place indicated by all the asterisks).
REMEMBER: If you share your computer, then potentially someone else will have access to these passwords.
Save the file as “PuppetLogin.html”
Check the filename. If it saved as “PuppetLogin.html.txt” or similar, rename it to “PuppetLogin.html”.
When you open the file again, it should get opened in your browser by default. You should see a black page with “Wolfram & Hart” written across the top.
When you click the button, the code should send login requests to NS. NS then sends a response back. The code associated with the response gets displayed on your webpage.
Why
Yes, I know there's already code out there that you can download. But I don't like downloading things, and I like to know how things work. So I wrote code that needs no downloading, and is filled with explanatory comments.
HTML can be written in a simple text editor, and JavaScript can be embedded directly in HTML. Both will be recognised by your browser without the need for any other software or downloads. So they're what I used.
This is the first time I've properly tried to code HTML and JavaScript, so I've added comments at practically every line of code, explaining what it does. That also means users know exactly what they are getting.
- Code: Select all
<!DOCTYPE html>
<!-- Wolfram & Hart Puppet Login Script v1.0
Version | Date | Name | Comment
1.0 | 04 Dec 2017 | Wolfram & Hart | Created
This code is not warranted in any way. Use at your own risk.
Use and modify this code as suits.
Make sure you comply with the NationStates API rules.
See: https://www.nationstates.net/pages/api.html
Don't use this code to log in more than 25 puppets in 30 seconds.
(That would break NationStates API rules, as at the time of writing).
-->
<head>
<!-- Set the title, visible in the browser tab -->
<title>W&H Puppet Login</title>
<!-- Set the colour scheme and format for the page -->
<style>
body {background-color: black;}
div {
text-align:center;
color: white;
font-family: times;
}
</style>
</head>
<body>
<div>
<!-- Display headers. Use <span> tags to format the "W", "&", and "H" in "Wolfram & Hart". -->
<h1><span style="font-size:120%;">W</span>OLFRAM <span style="color:red; font-size:120%;">&</span> <span style="font-size:120%;">H</span>ART</h1>
<h3>Puppet Login</h3>
<!-- Add a blank line -->
<br>
<!-- Add a button. When clicked, this will run the JavaScript code -->
<button type="button" onclick="fLoginAll()">Login</button>
<!-- Add an empty paragraph, ready to display results -->
<p id="result"></p>
</div>
<!-- This is the JavaScript that will be run when the button is pressed -->
<script>
/* **********************CHANGE THIS TO USE YOUR OWN EMAIL ADDRESS********************** */
/* NationStates require a 'UserAgent', so you can be contacted if something goes wrong */
var strUserAgent = "myname@email.com"
/* ************************************************************************************* */
/* Tell NS the format of the password. This code uses the unencrypted text password.
(The one you type into the NationStates website). NS allows you to use an encrypted
password instead. See this page for more details:
https://www.nationstates.net/pages/api.html#nationapi-privateshards
*/
var strPasswordType = "X-Password"
/* Set a variable to record the nations processed. This will update the html paragraph */
var strMessage = "";
/* ************CHANGE THIS TO INCLUDE UP TO 25 OF YOUR NATIONS AND PASSWORDS*********** */
/* This function calls the fLogin function (below) for each nation / password pair.
You can have up to 25 nations here without breaking NS API rules */
function fLoginAll() {
fLogin("Nation 1", "Password1")
fLogin("Nation 2", "Password2")
fLogin("Nation 3", "Password3")
fLogin("Nation 4", "Password4")
}
/* ************************************************************************************* */
/* This function uses AJAX to 'ping' (login) each nation, and records if the ping worked. */
function fLogin(strNation, strPassword) {
/* Create an object to send the login details to NS */
var xhttp = new XMLHttpRequest();
/* Set the object to update the html paragraph when it gets a response from NS */
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4) {
strMessage = strMessage+"<br>" + strNation + ": " + xhttp.status;
if (xhttp.status == 200) {
strMessage = strMessage + ": OK";
} else if (xhttp.status == 403) {
strMessage = strMessage + ": Forbidden (incorrect password?)";
} else if (xhttp.status == 404) {
strMessage = strMessage + ": Not Found (nation doesn't exist?)";
} else if (xhttp.status == 429) {
strMessage = strMessage + ": Exceeding Rate Limit (max 25 nations every 30 seconds)";
}
document.getElementById("result").innerHTML = strMessage;
}
};
/* Tell the object which nation URL to log in to.
Replace any space characters in the nation name (" ") with underlines ("_")
Tell it the password.
Tell it your contact details.
Send the request to NS.
*/
xhttp.open("GET", "https://www.nationstates.net/cgi-bin/api.cgi?nation="+strNation.replace(" ", "_")+"&q=ping", true);
xhttp.setRequestHeader(strPasswordType, strPassword)
xhttp.setRequestHeader("User-Agent", strUserAgent)
xhttp.send();
}
</script>
</body>
</html>
Advertisement
Users browsing this forum: No registered users
Advertisement