X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fs_user.c;h=c607f1b88258bbb9dd65e99645f1842c53a73783;hb=241fa041ccfa00c2f9f255c4c2a572d877b975e3;hp=b4695ede58b6b27342d0fc91376884920196833d;hpb=8af0b38d9397766bbed511f317832e5c5bf7e45d;p=ircu2.10.12-pk.git diff --git a/ircd/s_user.c b/ircd/s_user.c index b4695ed..c607f1b 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -130,50 +130,6 @@ void user_count_memory(size_t* count_out, size_t* bytes_out) *bytes_out = userCount * sizeof(struct User); } -/* - * user_set_away - set user away state - * returns 1 if client is away or changed away message, 0 if - * client is removing away status. - * NOTE: this function may modify user and message, so they - * must be mutable. - */ -int user_set_away(struct User* user, char* message) -{ - char* away; - assert(0 != user); - - away = user->away; - - if (EmptyString(message)) { - /* - * Marking as not away - */ - if (away) { - MyFree(away); - user->away = 0; - } - } - else { - /* - * Marking as away - */ - unsigned int len = strlen(message); - - if (len > TOPICLEN) { - message[TOPICLEN] = '\0'; - len = TOPICLEN; - } - if (away) - away = (char*) MyRealloc(away, len + 1); - else - away = (char*) MyMalloc(len + 1); - assert(0 != away); - - user->away = away; - strcpy(away, message); - } - return (user->away != 0); -} /* * next_client