diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-05 17:24:04 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-05 17:24:04 -0700 |
commit | 109fe7bd0acbaf7ee7383b607d08b79ab19fb5f5 (patch) | |
tree | abd71aebb7ed3687cf284ba75a6a37a58b7bc1e0 /testing/toxic/prompt.c | |
parent | f4c40c3672e60c0135416ac70c9e95aa57f5f181 (diff) | |
parent | 37afc3c583eee67aec17f9d7053489e9033b33ba (diff) |
Merge pull request #341 from stal888/userstatus-ext
An extension to user statuses.
Diffstat (limited to 'testing/toxic/prompt.c')
-rw-r--r-- | testing/toxic/prompt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index e5dc5086..16750c5d 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -91,7 +91,7 @@ static void execute(ToxWindow* self, char* cmd) { | |||
91 | dht.ip.i = resolved_address; | 91 | dht.ip.i = resolved_address; |
92 | unsigned char *binary_string = hex_string_to_bin(key); | 92 | unsigned char *binary_string = hex_string_to_bin(key); |
93 | DHT_bootstrap(dht, binary_string); | 93 | DHT_bootstrap(dht, binary_string); |
94 | free(binary_string); | 94 | free(binary_string); |
95 | } | 95 | } |
96 | else if(!strncmp(cmd, "add ", strlen("add "))) { | 96 | else if(!strncmp(cmd, "add ", strlen("add "))) { |
97 | uint8_t id_bin[32]; | 97 | uint8_t id_bin[32]; |
@@ -137,7 +137,7 @@ static void execute(ToxWindow* self, char* cmd) { | |||
137 | 137 | ||
138 | num = m_addfriend(id_bin, (uint8_t*) msg, strlen(msg)+1); | 138 | num = m_addfriend(id_bin, (uint8_t*) msg, strlen(msg)+1); |
139 | switch (num) { | 139 | switch (num) { |
140 | case -1: | 140 | case -1: |
141 | wprintw(self->window, "Message is too long.\n"); | 141 | wprintw(self->window, "Message is too long.\n"); |
142 | break; | 142 | break; |
143 | case -2: | 143 | case -2: |
@@ -151,7 +151,7 @@ static void execute(ToxWindow* self, char* cmd) { | |||
151 | break; | 151 | break; |
152 | case -5: | 152 | case -5: |
153 | wprintw(self->window, "Undefined error when adding friend.\n"); | 153 | wprintw(self->window, "Undefined error when adding friend.\n"); |
154 | break; | 154 | break; |
155 | default: | 155 | default: |
156 | wprintw(self->window, "Friend added as %d.\n", num); | 156 | wprintw(self->window, "Friend added as %d.\n", num); |
157 | on_friendadded(num); | 157 | on_friendadded(num); |
@@ -174,7 +174,7 @@ static void execute(ToxWindow* self, char* cmd) { | |||
174 | } | 174 | } |
175 | msg++; | 175 | msg++; |
176 | 176 | ||
177 | m_set_userstatus((uint8_t*) msg, strlen(msg)+1); | 177 | m_set_userstatus(USERSTATUS_KIND_RETAIN, (uint8_t*) msg, strlen(msg)+1); |
178 | wprintw(self->window, "Status set to: %s\n", msg); | 178 | wprintw(self->window, "Status set to: %s\n", msg); |
179 | } | 179 | } |
180 | else if(!strncmp(cmd, "nick ", strlen("nick "))) { | 180 | else if(!strncmp(cmd, "nick ", strlen("nick "))) { |