+Thu Nov 14 19:33:28 CET 2002 Jochen Eisinger <c0ffee@penguin-breeder.org>
+
+ * Print "nick now appears as newnick" and update Irssi's nicklist
+ when you change your nick to "nick". Closes #62
+ * Never format your own nick. Closes #63
+
Thu Nov 14 09:44:54 CET 2002 Jochen Eisinger <c0ffee@penguin-breeder.org>
* SILC_UMODE_GONE changes are now propagated correctly to the
if (!len || freebase)
return;
+ if (clients_count == 1)
+ unformatted = clients[0];
+ else
+ for (i = 0; i < clients_count; i++)
+ if (!strncasecmp(clients[i]->nickname, client_entry->nickname,
+ strlen(clients[i]->nickname)))
+ unformatted = clients[i];
+
+ /* If we are changing nickname of our local entry we'll enforce
+ that we will always get the unformatted nickname. Give our
+ format number to the one that is not formatted now. */
+ if (unformatted && client_entry == conn->local_entry)
+ client_entry = unformatted;
+
cp = client->internal->params->nickname_format;
while (*cp) {
if (*cp == '%') {
char tmp[6];
int num, max = 1;
- if (clients_count == 1) {
- unformatted = clients[0];
+ if (clients_count == 1)
break;
- }
for (i = 0; i < clients_count; i++) {
- if (!strncasecmp(clients[i]->nickname, client_entry->nickname,
- strlen(clients[i]->nickname)))
- unformatted = clients[i];
if (strncasecmp(clients[i]->nickname, newnick, off))
continue;
if (strlen(clients[i]->nickname) <= off)
newnick = silc_realloc(newnick, sizeof(*newnick) * (off + 1));
newnick[off] = 0;
- /* If we are changing nickname of our local entry we'll enforce
- that we will always get the unformatted nickname. Give our
- format number to the one that is not formatted now. */
- if (unformatted && client_entry == conn->local_entry)
- client_entry = unformatted;
-
silc_free(client_entry->nickname);
client_entry->nickname = newnick;
silc_free(clients);