mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:53:02 +01:00
Merge pull request #341 from stal888/userstatus-ext
An extension to user statuses.
This commit is contained in:
commit
173a1f8fb6
2
chat.c
2
chat.c
@ -162,7 +162,7 @@ void execute(ToxWindow* self, ChatContext* ctx, char* cmd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg++;
|
msg++;
|
||||||
m_set_userstatus((uint8_t*) msg, strlen(msg)+1);
|
m_set_userstatus(USERSTATUS_KIND_RETAIN, (uint8_t*) msg, strlen(msg)+1);
|
||||||
wprintw(ctx->history, "Status set to: %s\n", msg);
|
wprintw(ctx->history, "Status set to: %s\n", msg);
|
||||||
}
|
}
|
||||||
else if (!strncmp(cmd, "/nick ", strlen("/nick "))) {
|
else if (!strncmp(cmd, "/nick ", strlen("/nick "))) {
|
||||||
|
2
main.c
2
main.c
@ -69,7 +69,7 @@ void on_nickchange(int friendnumber, uint8_t* string, uint16_t length) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_statuschange(int friendnumber, uint8_t* string, uint16_t length) {
|
void on_statuschange(int friendnumber, USERSTATUS_KIND kind, uint8_t* string, uint16_t length) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
wprintw(prompt->window, "\n(statuschange) %d: %s!\n", friendnumber, string);
|
wprintw(prompt->window, "\n(statuschange) %d: %s!\n", friendnumber, string);
|
||||||
|
2
prompt.c
2
prompt.c
@ -174,7 +174,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
|||||||
}
|
}
|
||||||
msg++;
|
msg++;
|
||||||
|
|
||||||
m_set_userstatus((uint8_t*) msg, strlen(msg)+1);
|
m_set_userstatus(USERSTATUS_KIND_RETAIN, (uint8_t*) msg, strlen(msg)+1);
|
||||||
wprintw(self->window, "Status set to: %s\n", msg);
|
wprintw(self->window, "Status set to: %s\n", msg);
|
||||||
}
|
}
|
||||||
else if(!strncmp(cmd, "nick ", strlen("nick "))) {
|
else if(!strncmp(cmd, "nick ", strlen("nick "))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user