isolate command processing
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
287e3ce0cf
commit
4ec2881cee
2
TODO.txt
2
TODO.txt
@ -56,6 +56,8 @@ REF
|
|||||||
|
|
||||||
https://www.alien.net.au/irc/irc2numerics.html
|
https://www.alien.net.au/irc/irc2numerics.html
|
||||||
|
|
||||||
|
http://faerion.sourceforge.net/doc/irc/whox.var
|
||||||
|
|
||||||
http://www.anta.net/misc/telnet-troubleshooting/irc.shtml
|
http://www.anta.net/misc/telnet-troubleshooting/irc.shtml
|
||||||
|
|
||||||
https://tools.ietf.org/html/rfc2812
|
https://tools.ietf.org/html/rfc2812
|
||||||
|
13
server.go
13
server.go
@ -330,6 +330,19 @@ func (s *Server) handleRegisteredCommand(command string, args []string) {
|
|||||||
s.DisconnectClient()
|
s.DisconnectClient()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
s.handleJoinedCommand(command, args)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Server) handleJoinedCommand(command string, args []string) {
|
||||||
|
|
||||||
|
if s.clientState != CSJoined {
|
||||||
|
s.reply(errNotReg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
switch command {
|
||||||
case "PART":
|
case "PART":
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
s.reply(errMoreArgs)
|
s.reply(errMoreArgs)
|
||||||
|
Loading…
Reference in New Issue
Block a user