Changeset 263 in code for trunk/upstream.go


Ignore:
Timestamp:
Apr 16, 2020, 3:38:47 PM (5 years ago)
Author:
delthas
Message:

Add support for custom network on-connect commands

Some servers use custom IRC bots with custom commands for registering to
specific services after connection.

This adds support for setting custom raw IRC messages, that will be
sent after registering to a network.

It also adds support for a custom flag.Value type for string
slice flags (flags taking several string values).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upstream.go

    r261 r263  
    11901190        }
    11911191
     1192        for _, command := range uc.network.ConnectCommands {
     1193                m, err := irc.ParseMessage(command)
     1194                if err != nil {
     1195                        uc.logger.Printf("failed to parse connect command %q: %v", command, err)
     1196                } else {
     1197                        uc.SendMessage(m)
     1198                }
     1199        }
     1200
    11921201        return nil
    11931202}
Note: See TracChangeset for help on using the changeset viewer.