]> PatchyGit - patchyircd.git/commitdiff
admin: error for channel_new
authorEgor <egor@patchysicp.xyz>
Sun, 8 Feb 2026 00:40:36 +0000 (02:40 +0200)
committerEgor <egor@patchysicp.xyz>
Sun, 8 Feb 2026 00:40:36 +0000 (02:40 +0200)
src/admin.cpp

index 49ef0c0..e37bcd2 100644 (file)
@@ -329,7 +329,7 @@ static int fn_channel_new(lua_State *L)
        time_t creation = luaL_optinteger(L, 2, 0);
        size_t chanlen = strlen(channel);
        if (chanlen > 32)
-               return 0; // FIXME: error
+               luaL_error(L, "channel name length too long!");
        char key[33];
        memcpy(key, channel, chanlen+1);
        stringlower(key);