Changeset 14 in code for trunk


Ignore:
Timestamp:
Feb 6, 2020, 3:39:09 PM (5 years ago)
Author:
contact
Message:

Ignore some upstream messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r13 r14  
    1010)
    1111
     12const (
     13        rpl_localusers = "265"
     14        rpl_globalusers = "266"
     15)
     16
    1217type upstreamConn struct {
    1318        net net.Conn
    1419        irc *irc.Conn
    1520        srv *Server
     21        registered bool
    1622}
    1723
     
    2430                        Params:  []string{c.srv.Hostname},
    2531                })
     32        case irc.RPL_WELCOME:
     33                c.registered = true
     34        case irc.RPL_YOURHOST, irc.RPL_CREATED, irc.RPL_MYINFO:
     35                // Ignore
     36        case irc.RPL_LUSERCLIENT, irc.RPL_LUSEROP, irc.RPL_LUSERUNKNOWN, irc.RPL_LUSERCHANNELS, irc.RPL_LUSERME:
     37                // Ignore
     38        case irc.RPL_MOTDSTART, irc.RPL_MOTD, irc.RPL_ENDOFMOTD:
     39                // Ignore
     40        case rpl_localusers, rpl_globalusers:
     41                // Ignore
     42        case irc.RPL_STATSVLINE, irc.RPL_STATSPING, irc.RPL_STATSBLINE, irc.RPL_STATSDLINE:
     43                // Ignore
    2644        default:
    2745                c.srv.Logger.Printf("Unhandled upstream message: %v", msg)
    28                 return nil
    2946        }
     47        return nil
    3048}
    3149
Note: See TracChangeset for help on using the changeset viewer.