aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/irc.c b/src/irc.c
index 2fdb8b8..9c2ccd8 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -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) {