remove unnecessary String()s; rename parse functions

This commit is contained in:
Jeremy Latt
2014-03-28 13:47:49 -07:00
parent 21a86c3216
commit b0bb0faadc
6 changed files with 93 additions and 185 deletions

View File

@@ -1,9 +1,5 @@
package irc
import (
"fmt"
)
type TheaterClient Name
func (c TheaterClient) Id() Name {
@@ -29,10 +25,6 @@ func (m *TheaterIdentifyCommand) LoadPassword(s *Server) {
m.hash = s.theaters[m.channel]
}
func (cmd *TheaterIdentifyCommand) String() string {
return fmt.Sprintf("THEATER_IDENTIFY(channel=%s)", cmd.channel)
}
func (m *TheaterIdentifyCommand) HandleServer(s *Server) {
client := m.Client()
if !m.channel.IsChannel() {
@@ -66,10 +58,6 @@ type TheaterPrivMsgCommand struct {
message Text
}
func (cmd *TheaterPrivMsgCommand) String() string {
return fmt.Sprintf("THEATER_PRIVMSG(channel=%s, asNick=%s, message=%s)", cmd.channel, cmd.asNick, cmd.message)
}
func (m *TheaterPrivMsgCommand) HandleServer(s *Server) {
client := m.Client()
@@ -102,10 +90,6 @@ type TheaterActionCommand struct {
action CTCPText
}
func (cmd *TheaterActionCommand) String() string {
return fmt.Sprintf("THEATER_ACTION(channel=%s, asNick=%s, action=%s)", cmd.channel, cmd.asNick, cmd.action)
}
func (m *TheaterActionCommand) HandleServer(s *Server) {
client := m.Client()