diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-04-02 03:57:58 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-04-02 03:58:15 -0400 |
| commit | ab278aca29eebc23eb6538fb5060f51afb8dca86 (patch) | |
| tree | 486d188812256aeb5f7d0073aaa8f5b38983d60c /src/irc.c | |
| parent | 63a7c424ac966f3b824b8bdfcb756f68052533a5 (diff) | |
| download | fujinet-chat-ab278aca29eebc23eb6538fb5060f51afb8dca86.tar.gz | |
Rewrite permute_nick() in asm. 5867 bytes free.
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -363,27 +363,7 @@ static void do_mode(void) { do_catchall(0); } -/* permutes last character (doesn't add one), so for "Bob" you get: - Bo_, Bo1 through Bo9, BoA through BoZ - Gives a total of 36 replacement nicks to try. - Eventually we run out and start repeating, but by then the IRC - server will have disconnected us. - */ -static void permute_nick(void) { - static char *last; - - last = conf->nick + strlen(conf->nick) - 1; - - if((*last >= '1' && *last < '9') || (*last >= 'A' && *last < 'Z')) { - (*last)++; - } else { - switch(*last) { - case '_': *last = '1'; break; - case '9': *last = 'A'; break; - default: *last = '_'; break; - } - } -} +extern void permute_nick(void); /* see: https://defs.ircdocs.horse/ */ static void do_forward_chan(void) { |
