config

package
v0.0.0-...-2cae83e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

  • BSD 2-Clause License *

  • Copyright (c) 2024, Anthony DeDominic *

  • Redistribution and use in source and binary forms, with or without

  • modification, are permitted provided that the following conditions are met: *

  • 1. Redistributions of source code must retain the above copyright notice, this

  • list of conditions and the following disclaimer. *

  • 2. Redistributions in binary form must reproduce the above copyright notice,

  • this list of conditions and the following disclaimer in the documentation

  • and/or other materials provided with the distribution. *

  • THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

  • AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

  • IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

  • DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

  • FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

  • DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

  • SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

  • CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

  • OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

  • OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  • BSD 2-Clause License *

  • Copyright (c) 2024, Anthony DeDominic *

  • Redistribution and use in source and binary forms, with or without

  • modification, are permitted provided that the following conditions are met: *

  • 1. Redistributions of source code must retain the above copyright notice, this

  • list of conditions and the following disclaimer. *

  • 2. Redistributions in binary form must reproduce the above copyright notice,

  • this list of conditions and the following disclaimer in the documentation

  • and/or other materials provided with the distribution. *

  • THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

  • AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

  • IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

  • DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

  • FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

  • DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

  • SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

  • CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

  • OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

  • OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/ wrapped duration type for time.Duration so it can be unmarshaled from json

  • BSD 2-Clause License *
  • Copyright (c) 2024, Anthony DeDominic *
  • Redistribution and use in source and binary forms, with or without
  • modification, are permitted provided that the following conditions are met: *
  • 1. Redistributions of source code must retain the above copyright notice, this
  • list of conditions and the following disclaimer. *
  • 2. Redistributions in binary form must reproduce the above copyright notice,
  • this list of conditions and the following disclaimer in the documentation
  • and/or other materials provided with the distribution. *
  • THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  • AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  • IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  • DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  • FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  • DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  • SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  • CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  • OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  • OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

Constants

View Source
const (
	AddInvite = iota
	DelInvite = iota
)

Variables

This section is empty.

Functions

func HasInvite

func HasInvite(ch string) bool

func SaveNewInvite

func SaveNewInvite(action int, newchan string)

func SplitChannelList

func SplitChannelList(channels []string) string

Types

type Config

type Config struct {
	Nick string
	Pass string
	Host string
	// note that SASL is too much work for now. deal with it.
	Nickserv      string
	Tls           bool
	IgnoreBots    bool     `json:"ignore-bots"`
	SendDelay     Duration `json:"send-delay"`
	MooseUrl      string   `json:"moose-url"`
	Channels      []string
	InviteFile    string   `json:"invite-file"`
	GatewayUsers  []string `json:"gateway-users"`
	DisableSearch bool     `json:"disable-search"`
}
var C Config

type Duration

type Duration time.Duration

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type Invites

type Invites struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL