Weekly commits shouldn't be on release branch

This commit is contained in:
Alex Bramley 2011-07-26 20:25:14 +01:00
parent d2cfe6eb6f
commit 934ee04fcf
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ func (conn *Conn) dispatchEvent(line *Line) {
strings.HasPrefix(line.Args[1], "\001") && strings.HasPrefix(line.Args[1], "\001") &&
strings.HasSuffix(line.Args[1], "\001") { strings.HasSuffix(line.Args[1], "\001") {
// WOO, it's a CTCP message // WOO, it's a CTCP message
t := strings.SplitN(strings.Trim(line.Args[1], "\001"), " ", 2) t := strings.Split(strings.Trim(line.Args[1], "\001"), " ", 2)
if len(t) > 1 { if len(t) > 1 {
// Replace the line with the unwrapped CTCP // Replace the line with the unwrapped CTCP
line.Args[1] = t[1] line.Args[1] = t[1]
@ -256,7 +256,7 @@ func (conn *Conn) h_352(line *Line) {
// XXX: do we care about the actual server the nick is on? // XXX: do we care about the actual server the nick is on?
// or the hop count to this server? // or the hop count to this server?
// last arg contains "<hop count> <real name>" // last arg contains "<hop count> <real name>"
a := strings.SplitN(line.Args[len(line.Args)-1], " ", 2) a := strings.Split(line.Args[len(line.Args)-1], " ", 2)
n.Name = a[1] n.Name = a[1]
if idx := strings.Index(line.Args[6], "*"); idx != -1 { if idx := strings.Index(line.Args[6], "*"); idx != -1 {
n.Modes.Oper = true n.Modes.Oper = true
@ -272,7 +272,7 @@ func (conn *Conn) h_352(line *Line) {
// Handle 353 names reply // Handle 353 names reply
func (conn *Conn) h_353(line *Line) { func (conn *Conn) h_353(line *Line) {
if ch := conn.GetChannel(line.Args[2]); ch != nil { if ch := conn.GetChannel(line.Args[2]); ch != nil {
nicks := strings.Split(line.Args[len(line.Args)-1], " ") nicks := strings.Split(line.Args[len(line.Args)-1], " ", -1)
for _, nick := range nicks { for _, nick := range nicks {
// UnrealIRCd's coders are lazy and leave a trailing space // UnrealIRCd's coders are lazy and leave a trailing space
if nick == "" { if nick == "" {

View File

@ -41,7 +41,7 @@ func parseLine(s string) *Line {
// now we're here, we've parsed a :nick!user@host or :server off // now we're here, we've parsed a :nick!user@host or :server off
// s should contain "cmd args[] :text" // s should contain "cmd args[] :text"
args := strings.SplitN(s, " :", 2) args := strings.Split(s, " :", 2)
if len(args) > 1 { if len(args) > 1 {
args = append(strings.Fields(args[0]), args[1]) args = append(strings.Fields(args[0]), args[1])
} else { } else {