mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
parent
9214d978d0
commit
3ee6fd1f6c
5 changed files with 41 additions and 13 deletions
|
|
@ -316,6 +316,19 @@ func makeServiceHelpTextGenerator(cmd string, banner string) func(*Client) strin
|
|||
}
|
||||
}
|
||||
|
||||
func overrideServicePrefixes(hostname string) error {
|
||||
if hostname == "" {
|
||||
return nil
|
||||
}
|
||||
if !utils.IsHostname(hostname) {
|
||||
return fmt.Errorf("`%s` is an invalid services hostname", hostname)
|
||||
}
|
||||
for _, serv := range OragonoServices {
|
||||
serv.prefix = fmt.Sprintf("%s!%s@%s", serv.Name, serv.Name, hostname)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func initializeServices() {
|
||||
// this modifies the global Commands map,
|
||||
// so it must be called from irc/commands.go's init()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue