Add a VERSION reply that uses 7-bit characters

This commit is contained in:
Neale Pickett 2015-05-08 19:28:12 +00:00
parent 53d8d003b4
commit 481d4199d3
1 changed files with 11 additions and 1 deletions

View File

@ -174,17 +174,27 @@ func (nw *Network) MessageDispatch() {
log.Print(err) log.Print(err)
continue continue
} }
nw.logq <- m nw.logq <- m
// XXX: Add in a handler subprocess call // XXX: Add in a handler subprocess call
switch m.Command { switch m.Command {
case "PING": case "PING":
nw.outq <- "PONG :" + m.Text nw.outq <- "PONG :" + m.Text
continue
case "001": case "001":
nw.JoinChannels() nw.JoinChannels()
case "433": case "433":
nw.NextNick() nw.NextNick()
case "PRIVMSG":
if m.Text == "\001VERSION\001" {
//nw.outq <- "NOTICE " + m.Sender + " :\001VERSION Spongy v8294.003.1R6pl58₄SEσ\001"
nw.outq <- "NOTICE " + m.Sender + " :\001 VERSION begin 644 version.txt\001"
nw.outq <- "NOTICE " + m.Sender + " :\001 VERSION F4W!O;F=Y('9E<G-I;VX@.#(Y-\"XP,#,N,5(V<&PU..*\"A%-%SX,`\001"
nw.outq <- "NOTICE " + m.Sender + " :\001 VERSION `\001"
nw.outq <- "NOTICE " + m.Sender + " :\001 VERSION end\001"
}
} }
} }
} }