about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fixed newline extra gap when running 'tcoin init'login (tilde.temm)2019-11-151-5/+6
| | | | | | | | Just a minor aesthetic fix so that there is even newline gaps between statements when running 'tcoin init'.
* | Fixed newline extra gap when running 'tcoin init'login (tilde.temm)2019-11-151-4/+5
|/ | | | Just a minor aesthetic fix so that there is even newline gaps between statements when running 'tcoin init'.
* Fixed small error in ntcoinlogin (tilde.temm)2019-11-151-2/+2
| | | | A small error was present in ntcoin, where a chmod on a file that may not exist was blocking the execution of future commands due to failing. Now, the command is always set to succeed.
* Fixed symlinking bug in ntcoin regarding compile_(t/p)coin and edit_(t/p)coinlogin2019-11-151-2/+4
| | | | Fixed a bug in ntcoin where the symlinks from tcoin/bin/compile_tcoin and tcoin/bin/edit_tcoin to ~/bin/compile_tcoin and ~/bin/edit_tcoin are made properly. The previous command did something else.
* Added check for number of basecoins <n> in ntcoinlogin (tilde.club)2019-11-151-0/+5
| | | | ntcoin would accept no number of basecoins <n>. Now, there is a check added near the beginning for <n> existing and being a non-negative integer.
* Bugfix in ntcoin to fix error in compile_pcoinlogin2019-11-151-1/+1
| | | | ntcoin had an error in the way it created compile_pcoin. compile_pcoin had a missing \ at the end of the line (for line continuation). This bug has now been fixed.
* Improving the messaging around sending transaction messageslogin2019-11-152-36/+96
| | | | | | | | | | | Several changes were made that were difficult to separate into separate commits. Since features are directly committed to master, there are no feature branches. The high-level list of changes is as follows: 1. Fixed a bug in pcoin where using "pcoin send -s" for silentsend would forget to add the transaction message that provides a record of who transferred how much and when, even if there is no custom message appended (send_message(.) was not called). 2. Improved the help text to make it clear that sending messages could be done using silentsend too. 3. In several cases in tcoin and pcoin, certain ways of doing a silentsend would still send with verbose output because, by mistake, the option passed to send_message(.) was not changed from "verbose" to "silent". 4. In pcoin, there was the case of 6 arguments missing, where one does pcoin send -s <user> <amount> <message>. This case was handled in tcoin but not pcoin. Now, it is handled in pcoin too. 5. Now, when a custom message is sent in tcoin or pcoin, an additional text confirming the successful sending of the custom message as distinct from the one confirming the sending of the coins is displayed to the user.
* Optimisations to ntcoin's pcoin_defs.cpp and tcoin_defs.cpplogin2019-11-141-3/+0
| | | | pcoin_defs.cpp and tcoin_defs.cpp contained definitions which were used in one but not the other. ntcoin now only includes those definitions in either which are used by the respective source file (and no other definitions).
* Updated the scrypt file included here to use the latest libcrypto.so (so far)login2019-11-141-0/+0
| | | | scrypt, the executable, uses libcrypto.so, which was updated from 1.0.0 to a more recent version (most likely 1.1). Thus, it had to be recompiled. The new version is included by default now in this directory.
* Increasing reliability of edit_tcoin and edit_pcoin as defined in ntcoin~login@aussies.space2019-11-141-2/+2
| | | | ntcoin creates the scripts edit_tcoin and edit_pcoin. Now, instead of assuming 'nano' is included at /bin/nano, it uses `which nano` to determine where 'nano' is included in the current system. Quotation marks are used around 'nano''s file argument to increase robustness around spaces in file paths.
* Included quotation marks in compile_tcoin and compile_pcoin generated by ntcoin~login@aussies.space2019-11-141-2/+2
| | | | | | In order to be robust against spaces present in the directories passed to ntcoin, quotes around the additional directory to search for includes (g++ -I) and the output file directory specified in g++ are now included in ntcoin. ntcoin generates the compile_tcoin and compile_pcoin scripts.
* KROWBAR_OFF, DA_OFF and MINERCOIN_OFF are now treated as config definitions~login@aussies.space2019-11-143-11/+12
| | | | | | The KROWBAR_OFF, DA_OFF and MINERCOIN_OFF symbolic constants are now included in tcoin_defs.cpp and pcoin_defs.cpp and have been removed from the main source files, tcoin.cpp and pcoin.cpp. ntcoin has been modified to include #define KROWBAR_OFF, #define DA_OFF and #define MINERCOIN_OFF in pcoin_defs.cpp and tcoin_defs.cpp by default, since those three features are only (as of now) available on the tilde.town server and on no other server.
* Bugfix to disable minercoin-score addition in pcoin.cpp~login@aussies.space2019-11-141-1/+1
| | | | | | In pcoin.cpp, minercoin-score addition can be disabled by writing #define MINERCOIN_OFF near the symbolic-constant definitions. However, in one place, a check for the absence of the DA_OFF symbolic constant was being made instead of MINERCOIN_OFF. This is now fixed.
* Merge branch 'master' of https://github.com/login000/tcoin~login@aussies.space2019-11-141-0/+3
|\
| * tildecoin-check file includedlogin (tilde.club)2019-11-131-0/+3
| | | | | | | | tcc (which stands for 'tildecoin check'), simply adds all the balances and prints the sum. This can be used to check that the amounts sent and amounts received are equal.
* | Creates separate definition files for tcoin.cpp and pcoin.cpp~login@aussies.space2019-11-143-46/+46
|/ | | | | | I realised that different tilde servers will have different definitions but the same code otherwise, and 'git push' and 'git pull' to update the code on other servers would override those definitions. Thus, the tcoin.cpp and pcoin.cpp files now look the same for all tildeservers and have a #include "tcoin_defs.cpp" and #include "pcoin_defs.cpp" respectively. The configuration, which is in the form of #define symbolic constants, is stored in tcoin/bin/tcoin_defs.cpp and tcoin/bin/pcoin_defs.cpp. ntcoin is modified to create these two files with the right definitions. ntcoin is also modified so that compile_tcoin and compile_pcoin now include the -I option, which instructs the compiler to look for includes in additional directories, in this case, tcoin/bin .
* Merge branch 'master' of https://github.com/login000/tcoin~login@aussies.space2019-10-070-0/+0
|\
| * Bug fix to ntcoin~login@aussies.space2019-10-031-11/+19
| | | | | | | | | | | | Previously, the executables 'tcoin' and 'pcoin', which had setuid set, were stored in tcoin/bin/*. However, the "tcoin" directory is restricted, so any executables inside it are inaccessible to users. To fix this, the compile_tcoin and compile_pcoin scripts have been modified to store the executables in a third specified directory, called the <bin dir> in the help. <bin dir> will be accessible to all users. The symbolic constants/preprocessor directives have also been changed to reflect the updated paths.
* | Fixing a bug with how time is calculated for messages~login@aussies.space2019-10-072-12/+10
| | | | | | | | Benjamin Harris (https://ben.tild3.org, https://github.com/benharri, and https://benharr.is) found a bug where the time recorded for transaction logs/messages was local server time instead of UTC. It should have been UTC no matter what the local time was.
* | Fixing preprocessor constants~login@aussies.space2019-10-072-4/+4
| | | | | | | | To fix the preprocessor constants so that they point to the right directory for the tcoin and pcoin executables. This will be different depending on where the tcoin and pcoin executables are stored.
* | Bug fix to ntcoin~login@aussies.space2019-10-031-12/+20
|/ | | | | | Previously, the executables 'tcoin' and 'pcoin', which had setuid set, were stored in tcoin/bin/*. However, the "tcoin" directory is restricted, so any executables inside it are inaccessible to users. To fix this, the compile_tcoin and compile_pcoin scripts have been modified to store the executables in a third specified directory, called the <bin dir> in the help. <bin dir> will be accessible to all users. The symbolic constants/preprocessor directives have also been changed to reflect the updated paths.
* Default message when there are no messages.~login@aussies.space2019-10-031-5/+10
| | | | A default message is now shown when there are no messages to show.
* Added symbolic constants (flags) to remove integrations~login@aussies.space2019-09-301-4/+19
| | | | Since not all places where tcoin runs have tildebot, minerbot and daily-adventure, these integrations are now disabled in the code through preprocessor directives (symbolic constants that act as flags)
* Fixed preprocessor directives for pcoin.cpp and tcoin.cpp~login@aussies.space2019-09-302-0/+35
| | | | pcoin.cpp and tcoin.cpp were missing the preprocessor directives generated by ntcoin. The right preprocessor directives are now included in both files.
* Updated ntcoin to add more symbolic constants~login@aussies.space2019-09-301-2/+6
| | | | I had missed two symbolic constants that are present in pcoin.cpp but not tcoin.cpp. Those two have been added now.
* Bug fixes to ntcoin~login@aussies.space2019-09-301-19/+28
| | | | | | 1. Single quotes closed before command substitutions, and opened again right after them. (Some cases were missed previously.) 2. The u+s mode/permission is used on all subdirectories of the tcoin directory and the tcoin directory itself now, so that files created are owned by the owner of the containing directory by default. This will prevent the class of bugs that would arise when files are created through the tcoin executable (which has the setuid bit set). 3. A mistake in the file name and location of the base amount (tcoin/base/base.txt) was corrected.
* Adding an option to view the #define configuration without creating any ↵~login@aussies.space2019-09-301-1/+18
| | | | | | directories This option was added to allow the #define configuration to be reprinted even if ntcoin was already used to recreate tcoin's subdirectory structure.
* Added symbolic constants to disable tildebot, minerbot and daily-adventure ↵~login@aussies.space2019-09-301-5/+21
| | | | | | integrations Defining the symbolic constants NO_KROWBAR, NO_DA and NO_MINERCOIN disables the three coin integrations during compile time.
* Adding chmod u+x to scripts (and scrypt)~login@aussies.space2019-09-303-0/+0
|
* Updated ntcoin to get rid of trailing slashlogin0002019-09-301-77/+77
| | | | Uses "realpath" to get rid of all trailing slashes and check that each directory in the path supplied exist (other than the innermost directory).
* Creates ntcoin to set up relevant directories, scripts, and binaries for ↵login0002019-09-301-0/+150
| | | | | | | | | | | | tcoin and pcoin 1. Sets up all relevant directories, scripts and binaries for tcoin and pcoin, assuming the current directory is right inside the GitHub repo (same depth as the LICENSE file). 2. Creates soft-links to the executables in "bin" folder inside the "tcoin" folder in the "~/bin" folder. 3. Prints the relevant preprocessor directives to be put in tcoin.cpp and pcoin.cpp (without actually putting it in those two files). Because of 3. above, the tcoin.cpp and pcoin.cpp files will have to be modified again, after which "compile_tcoin" and "compile_pcoin" can be called again to update the binaries.
* npcoin modified to use current directorylogin0002019-09-301-21/+21
| | | | npcoin gets new pcoin accounts ready. The relevant paths were hardcoded earlier, but now assume the "tcoin" directory is in the current directory.
* Updating the successful login messagelogin0002019-09-241-1/+1
| | | Updating the successful login message to add additional information about running `tcoin` to check one's balance and messages. This is intended to make it easy for new users to know what to do once they've done "tcoin on".
* Stylistic update to "Last <n> messages"login0002019-09-241-1/+3
| | | When there are fewer than <n> messages in total, and one runs "tcoin -m <n>", an extra newline was shown between "Last <n> messages:" and the actual messages. This commit fixes that by checking if the first character in the actual messages is a newline and putting one more newline only if it isn't (instead of always).
* Removed redundant code in pcoin.cpplogin0002019-07-151-2/+0
| | | pcoin.cpp had redundant code in 'int main()', where user_amount was redeclared (and thus became a local variable that shadowed the global version inside 'int main()' (!). Fixed by removing the redeclared, redundant line.
* Fixed bug in "tcoin init" and "tcoin"login0002019-07-151-2/+1
| | | Fixed bug in "tcoin init" and "tcoin" when an uninitialised user runs them. Previously, it used to display the following error: Error! Could not open file at <file_path>! Assuming its internal content is "0\n" because 'user_amount' in 'int main()' was read from the file before checking if the user had initialised.
* Added #define DEBUG, fixed pcoin error messagelogin0002019-06-251-7/+13
| | | | Added #define DEBUG and put a few check statements under it. Fixed error message in pcoin that suggested the incorrect "add_internal_balance" amount when "internal_balance" owed to a particular user was not enough (and was lesser than the number of tildecoins being sent using the "send" command to said user). Also, fixed an error in retrieving the amount owed to a particular user when doing checks during the "send" command ("temp_program_sender_username" instead of "program_sender_username").
* Fixed std:;strcpy to std::strcpylogin0002019-06-221-1/+1
| | | credit to eigenellies/diodelasses and npa
* Fixing daily-adventure integration in pcoin.cpplogin0002019-04-181-1/+1
| | | daily-adventure changed how it stores state, so this new code fixes daily-adventure integration to the new format that daily-adventure stores state in.
* Fix daily-adventure integration in tcoin.cpplogin0002019-04-181-1/+1
| | | daily-adventure changed how it stores state, so this new code fixes daily-adventure integration to the new format that daily-adventure stores state in.
* bash script to create new program accountslogin0002019-03-101-0/+53
| | | bash script creates directory structure for new program accounts
* Copied pcoin.cpp from tilde.townlogin0002019-03-101-0/+1796
|
* Updated tcoin.cpp to latest versionlogin0002019-03-101-267/+932
|
* Create README.mdlogin0002018-03-061-0/+2
|
* Initial Commitlogin0002018-03-063-0/+1028
|
* Create LICENSElogin0002018-03-061-0/+21