mirror of
https://github.com/IllusionMan1212/gorc.git
synced 2026-10-24 02:12:33 +00:00
feat: handle ERR_NOSUCHNICK
This commit is contained in:
@@ -228,7 +228,7 @@ const (
|
|||||||
RPL_NOUSERS = "395" // RFC1459 - Not Implemented (TODO:)
|
RPL_NOUSERS = "395" // RFC1459 - Not Implemented (TODO:)
|
||||||
|
|
||||||
ERR_UNKNOWNERROR = "400" // ??????? - Not Implemented (TODO:)
|
ERR_UNKNOWNERROR = "400" // ??????? - Not Implemented (TODO:)
|
||||||
ERR_NOSUCHNICK = "401" // RFC1459 - Not Implemented (TODO:)
|
ERR_NOSUCHNICK = "401" // RFC1459 - Implemented
|
||||||
ERR_NOSUCHSERVER = "402" // RFC1459 - Implemented
|
ERR_NOSUCHSERVER = "402" // RFC1459 - Implemented
|
||||||
ERR_NOSUCHCHANNEL = "403" // RFC1459 - Implemented
|
ERR_NOSUCHCHANNEL = "403" // RFC1459 - Implemented
|
||||||
ERR_CANNOTSENDTOCHAN = "404" // RFC1459 - Implemented
|
ERR_CANNOTSENDTOCHAN = "404" // RFC1459 - Implemented
|
||||||
|
|||||||
+16
-3
@@ -795,12 +795,23 @@ func handleWHOISMODES(msg irc.Message, client *irc.Client) {
|
|||||||
client.Channels[0].AppendMsg(msg.Timestamp, message, msgOpts)
|
client.Channels[0].AppendMsg(msg.Timestamp, message, msgOpts)
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleNOSUCHSERVER(msg irc.Message, client *irc.Client) {
|
func handleNOSUCHNICK(msg irc.Message, client *irc.Client) {
|
||||||
message := msg.Parameters[1] + " " + msg.Parameters[2]
|
message := msg.Parameters[1] + ": " + msg.Parameters[2]
|
||||||
|
|
||||||
msgOpts := irc.MsgFmtOpts{
|
msgOpts := irc.MsgFmtOpts{
|
||||||
WithTimestamp: true,
|
WithTimestamp: true,
|
||||||
AsServerMsg: true,
|
AsErrorMsg: true,
|
||||||
|
}
|
||||||
|
|
||||||
|
client.Channels[0].AppendMsg(msg.Timestamp, message, msgOpts)
|
||||||
|
}
|
||||||
|
|
||||||
|
func handleNOSUCHSERVER(msg irc.Message, client *irc.Client) {
|
||||||
|
message := msg.Parameters[1] + ": " + msg.Parameters[2]
|
||||||
|
|
||||||
|
msgOpts := irc.MsgFmtOpts{
|
||||||
|
WithTimestamp: true,
|
||||||
|
AsErrorMsg: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
client.Channels[0].AppendMsg(msg.Timestamp, message, msgOpts)
|
client.Channels[0].AppendMsg(msg.Timestamp, message, msgOpts)
|
||||||
@@ -1027,6 +1038,8 @@ func HandleCommand(msg irc.Message, client *irc.Client) {
|
|||||||
handleWHOISHOST(msg, client)
|
handleWHOISHOST(msg, client)
|
||||||
case commands.RPL_WHOISMODES:
|
case commands.RPL_WHOISMODES:
|
||||||
handleWHOISMODES(msg, client)
|
handleWHOISMODES(msg, client)
|
||||||
|
case commands.ERR_NOSUCHNICK:
|
||||||
|
handleNOSUCHNICK(msg, client)
|
||||||
case commands.ERR_NOSUCHSERVER:
|
case commands.ERR_NOSUCHSERVER:
|
||||||
handleNOSUCHSERVER(msg, client)
|
handleNOSUCHSERVER(msg, client)
|
||||||
case commands.ERR_NOSUCHCHANNEL:
|
case commands.ERR_NOSUCHCHANNEL:
|
||||||
|
|||||||
Reference in New Issue
Block a user