about summary refs log tree commit diff stats
path: root/tcoin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed tcoin --help againlogin0002020-04-231-2/+2
| | | I forgot that base_amount held the number of centitildecoins, and that I had to use cout_formatted_amount() to actually send to stdout the number of tildecoins (with decimal places).
* Fixed a typo in void help(long long int)login0002020-04-231-1/+1
| | | I forgot to type "help(" and had just typed "void long long int base_amount)".
* Fixed a mistake in tcoin --helplogin0002020-04-231-3/+3
| | | Brought to my attention by ~mastergeek on tilde.team, the tcoin help incorrectly said that the number of tildecoins a user started with was 1000. It was actually the current base amount (unaltered by other sources like minercoin, tildebot or daily-adventure). Now, the help shows the right amount of starting coins.
* Fixed typo 'creata' to 'create'login2020-03-111-1/+1
| | | | Thanks to ~lickthecheese on tilde.town, tilde.team and other tildeboxes, I was informed of this typo: 'creata' -> 'create'
* Nobody's perfect: .n\n -> .\n\n in tcoin.cpp and pcoin.cpplogin (envs.net)2020-02-221-3/+3
| | | | | And I don't know how to clean my commits after having pushed them to remote origin/master. Maybe a Git stash and hard reset?
* Implemented message-character limits in tcoin.cpp and pcoin.cpplogin (tilde.temm)2020-02-211-0/+30
| | | | | | | | | | | | | After having received a 10000-character transaction message from ~jan6@envs.net, I finally came around to implementing character limits on transaction messages. Previously, I was of the opinion that one should be able to send a movie as a transaction message if one so wished. I took inspiration for an appropriate character limit from Australia's NPP (New Payments Platform), which has a 280-character limit on transaction messages. I strongly suspect this limit came from Twitter's analysis of tweets in different languages and Twitter research that concluded that a 280-character tweet was the appropriate length of tweet. A transaction message is supposedly like a tweet with some money sent along with it.
* Merge branch 'master' of https://github.com/login000/tcoinlogin (tilde.temm)2020-02-211-2/+6
|\ | | | | | | | | I made a mistake. I should have done this before making my commits. That's the only reason why this merge is necessary.
| * Many instances of \u23CE were left unmodified, so those were changed toologin (envs.net)2020-02-221-2/+6
| | | | | | | | | | | | I had forgotten to change \u23CE to <new-line> and introduce a check for <vertical-tab> in many many places in tcoin.cpp and pcoin.cpp. I should probably put these things in some kind of function so I don't repeat myself. I'll probably do that in a future commit.
* | Some more errors (specifically, fatal errors) were taken out into symbolic ↵login (tilde.temm)2020-02-211-10/+19
|/ | | | | | constants I had forgotten to handle the fatal errors and take the error numbers out into symbolic constants. I have now done that in tcoin.cpp and pcoin.cpp
* Separated error codes out into symbolic constants in tcoin.cpp and pcoin.cpplogin (envs.net)2020-02-221-20/+40
| | | | This doesn't change functionality. It is simply a refactor that separates error codes out into symbolic constants in tcoin.cpp and pcoin.cpp.
* Replacing newlines and vertical tabs in messages with <new-line> and ↵login (envs.net)2020-02-211-1/+3
| | | | | | <vertical-tab> Newlines and vertical tabs in messages are replaced with <new-line> and <vertical-tab> to prevent transaction spoofing inside a message.
* Minor grammatical correctionlogin2020-02-041-1/+1
| | | | Just added a period/fullstop to the message in the show_balances() function.
* Improving messaging around messageslogin2019-11-261-3/+43
| | | | The title is confusing, sorry. "No messages found" is shown in tcoin and pcoin when no messages are found (and this no-message message has one newline above and one newline below it instead of two newlines above it as before).
* 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'.
* Improving the messaging around sending transaction messageslogin2019-11-151-24/+44
| | | | | | | | | | | 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.
* KROWBAR_OFF, DA_OFF and MINERCOIN_OFF are now treated as config definitions~login@aussies.space2019-11-141-4/+0
| | | | | | 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.
* Creates separate definition files for tcoin.cpp and pcoin.cpp~login@aussies.space2019-11-141-13/+1
| | | | | | 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 .
* Fixing a bug with how time is calculated for messages~login@aussies.space2019-10-071-6/+5
| | | | 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-071-3/+3
| | | | 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.
* 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.
* Fixed preprocessor directives for pcoin.cpp and tcoin.cpp~login@aussies.space2019-09-301-0/+17
| | | | pcoin.cpp and tcoin.cpp were missing the preprocessor directives generated by ntcoin. The right preprocessor directives are now included in both files.
* 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.
* 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).
* 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.
* Fixed std:;strcpy to std::strcpylogin0002019-06-221-1/+1
| | | credit to eigenellies/diodelasses and npa
* 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.
* Updated tcoin.cpp to latest versionlogin0002019-03-101-267/+932
|
* Initial Commitlogin0002018-03-061-0/+1027
ckless/dwm/commit/event.c?h=5.7&id=2a0fc84c4af2257d79c4c7cb37131c4acb763162'>2a0fc84 ^
83d2390 ^
439e15d ^



439e15d ^

439e15d ^
439e15d ^




439e15d ^











0053620 ^

439e15d ^




439e15d ^





3399650 ^
b1701ad ^



3399650 ^




a05beb6 ^
3399650 ^
a05beb6 ^
3399650 ^



8b59083 ^
3399650 ^

439e15d ^




439e15d ^


0053620 ^

439e15d ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217