Skip to content

Commit 62cc9b9

Browse files
committed
Display an error log when the numeric 412 is received
1 parent 8797261 commit 62cc9b9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/irc_client/irc_runtime.erl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%--------------------------------------------------------------------
2-
%% Copyright (C) 2023 hyperimpose.org
2+
%% Copyright (C) 2023, 2025 hyperimpose.org
33
%%
44
%% This file is part of irc.
55
%%
@@ -62,6 +62,7 @@ message(Message, State) ->
6262
<<"352">> -> rpl_whoreply(Message, State);
6363
<<"376">> -> rpl_endofmotd(Message, State);
6464
<<"396">> -> rpl_visiblehost(Message, State);
65+
<<"412">> -> err_notexttosend(Message, State);
6566
<<"433">> -> err_nicknameinuse(Message, State);
6667
%% SASL
6768
<<"AUTHENTICATE">> -> sasl(<<"AUTHENTICATE">>, Message, State);
@@ -580,6 +581,13 @@ rpl_visiblehost(Message, #state{id = Id} = State) ->
580581
State.
581582

582583

584+
%%% 412 - ERR_NOTEXTTOSEND ===========================================
585+
586+
err_notexttosend(_Message, #state{id = Id} = State) ->
587+
?LOG_ERROR("[IRC:~p] {412} No text to send", [Id]),
588+
State.
589+
590+
583591
%%% 433 - ERR_NICKNAMEINUSE ==========================================
584592

585593
err_nicknameinuse(Message, #state{id = Id} = State) ->

0 commit comments

Comments
 (0)