Commit Graph

131 Commits

Author SHA1 Message Date
login (tilde.club) 89fca5bc7d tildecoin-check file included
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.
2019-11-13 15:11:16 -07:00
~login@aussies.space 4f07e446be Merge branch 'master' of https://github.com/login000/tcoin 2019-10-07 02:49:22 +00:00
~login@aussies.space 27060c1598 Fixing a bug with how time is calculated for messages
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.
2019-10-07 02:35:52 +00:00
~login@aussies.space a7b2bc1df6 Fixing preprocessor constants
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.
2019-10-07 02:34:24 +00:00
~login@aussies.space 0db09c1927 Bug fix to ntcoin
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.
2019-10-03 04:16:11 +00:00
~login@aussies.space 6825e86a24 Bug fix to ntcoin
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.
2019-10-03 04:08:42 +00:00
~login@aussies.space 4d21a73f72 Default message when there are no messages.
A default message is now shown when there are no messages to show.
2019-10-03 02:22:47 +00:00
~login@aussies.space 74152c106b Added symbolic constants (flags) to remove integrations
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)
2019-09-30 20:06:03 +00:00
~login@aussies.space 5067e392f1 Fixed preprocessor directives for pcoin.cpp and tcoin.cpp
pcoin.cpp and tcoin.cpp were missing the preprocessor directives generated by ntcoin. The right preprocessor directives are now included in both files.
2019-09-30 20:03:13 +00:00
~login@aussies.space 53cb9e1b71 Updated ntcoin to add more symbolic constants
I had missed two symbolic constants that are present in pcoin.cpp but not tcoin.cpp. Those two have been added now.
2019-09-30 18:08:55 +00:00
~login@aussies.space ff3805d309 Bug fixes to ntcoin
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.
2019-09-30 14:58:06 +00:00
~login@aussies.space a3c2369785 Adding an option to view the #define configuration without creating any 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.
2019-09-30 14:12:21 +00:00
~login@aussies.space 4a7909fbbd Added symbolic constants to disable tildebot, minerbot and daily-adventure integrations
Defining the symbolic constants NO_KROWBAR, NO_DA and NO_MINERCOIN disables the three coin integrations during compile time.
2019-09-30 13:57:00 +00:00
~login@aussies.space 5359a2c3a8 Adding chmod u+x to scripts (and scrypt) 2019-09-30 10:16:52 +00:00
login000 fb302642bb Updated ntcoin to get rid of trailing slash
Uses "realpath" to get rid of all trailing slashes and check that each directory in the path supplied exist (other than the innermost directory).
2019-09-30 19:15:11 +10:00
login000 6e7087c66f Creates ntcoin to set up relevant directories, scripts, and binaries for 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.
2019-09-30 19:05:53 +10:00
login000 921a198601 npcoin modified to use current directory
npcoin gets new pcoin accounts ready. The relevant paths were hardcoded earlier, but now assume the "tcoin" directory is in the current directory.
2019-09-30 18:58:30 +10:00
login000 eaad7d3d41
Updating the successful login message
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".
2019-09-24 02:05:27 +10:00
login000 bc0ab5dd6b
Stylistic update to "Last <n> messages"
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).
2019-09-24 02:01:34 +10:00
login000 84058f240a
Removed redundant code in pcoin.cpp
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.
2019-07-15 21:03:33 +10:00
login000 6a7afee933
Fixed bug in "tcoin init" and "tcoin"
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.
2019-07-15 20:10:23 +10:00
login000 d7db0da8b7
Added #define DEBUG, fixed pcoin error message
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").
2019-06-25 12:58:57 +10:00
login000 6411a27b8d
Fixed std:;strcpy to std::strcpy
credit to eigenellies/diodelasses and npa
2019-06-22 18:43:44 +10:00
login000 710767dee5
Fixing daily-adventure integration in pcoin.cpp
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.
2019-04-18 21:44:57 +10:00
login000 ca2464114c
Fix daily-adventure integration in tcoin.cpp
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.
2019-04-18 20:37:19 +10:00
login000 bd45e807ed
bash script to create new program accounts
bash script creates directory structure for new program accounts
2019-03-10 17:05:20 +11:00
login000 fa215b7d0d
Copied pcoin.cpp from tilde.town 2019-03-10 17:03:02 +11:00
login000 36123788b6
Updated tcoin.cpp to latest version 2019-03-10 17:01:45 +11:00
login000 4e1b641537
Create README.md 2018-03-06 13:43:37 +11:00
login000 7fb83ea04b
Initial Commit 2018-03-06 13:42:50 +11:00
login000 308d2ae4a9
Create LICENSE 2018-03-06 13:36:17 +11:00