plugins

package
v0.0.0-...-5e4c8b9 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUrls

func GetUrls(source string) []string

Types

type About

type About struct {
	Name string
	// contains filtered or unexported fields
}

func NewAbout

func NewAbout(name string, opt map[string]interface{}) *About

func (*About) Chat

func (m *About) Chat(msg xmpp.Chat)

func (*About) CheckEnv

func (m *About) CheckEnv() bool

func (*About) Description

func (m *About) Description() string

func (*About) GetName

func (m *About) GetName() string

func (*About) GetOptions

func (m *About) GetOptions() map[string]string

func (*About) GetSummary

func (m *About) GetSummary() string

func (*About) Help

func (m *About) Help() string

func (*About) ModCommand

func (m *About) ModCommand(cmd string, msg xmpp.Chat)

func (*About) Presence

func (m *About) Presence(pres xmpp.Presence)

func (*About) Restart

func (m *About) Restart()

func (*About) SetOption

func (m *About) SetOption(key, val string)

func (*About) Start

func (m *About) Start(bot *robot.Bot)

func (*About) Stop

func (m *About) Stop()

type ChatLogger

type ChatLogger struct {
	Id      int64
	JID     string
	Nick    string
	Text    string
	IsRoom  bool
	IsImage bool
	Created time.Time `xorm:"created index"`
	Updated time.Time `xorm:"updated index"`
}

type Example

type Example struct {
	Name   string
	Option map[string]bool
	// contains filtered or unexported fields
}

func NewExample

func NewExample(name string, opt map[string]interface{}) *Example

func (*Example) Chat

func (m *Example) Chat(msg xmpp.Chat)

func (*Example) CheckEnv

func (m *Example) CheckEnv() bool

func (*Example) Description

func (m *Example) Description() string

func (*Example) GetName

func (m *Example) GetName() string

func (*Example) GetOptions

func (m *Example) GetOptions() map[string]string

func (*Example) GetSummary

func (m *Example) GetSummary() string

func (*Example) Help

func (m *Example) Help() string

func (*Example) Presence

func (m *Example) Presence(pres xmpp.Presence)

func (*Example) Restart

func (m *Example) Restart()

func (*Example) SetOption

func (m *Example) SetOption(key, val string)

func (*Example) Start

func (m *Example) Start(bot *robot.Bot)

func (*Example) Stop

func (m *Example) Stop()

type Logger

type Logger struct {
	Name   string
	Option map[string]bool
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(name string, opt map[string]interface{}) *Logger

func (*Logger) Chat

func (m *Logger) Chat(msg xmpp.Chat)

func (*Logger) CheckEnv

func (m *Logger) CheckEnv() bool

func (*Logger) Description

func (m *Logger) Description() string

func (*Logger) GetName

func (m *Logger) GetName() string

func (*Logger) GetOptions

func (m *Logger) GetOptions() map[string]string

func (*Logger) GetRoomLogs

func (m *Logger) GetRoomLogs(jid string) ([]ChatLogger, error)

func (*Logger) GetSummary

func (m *Logger) GetSummary() string

func (*Logger) Help

func (m *Logger) Help() string

func (*Logger) IndexPage

func (m *Logger) IndexPage(w http.ResponseWriter, r *http.Request)

web pages

func (*Logger) JIDPage

func (m *Logger) JIDPage(w http.ResponseWriter, r *http.Request)

func (*Logger) LogInsert

func (m *Logger) LogInsert(msg xmpp.Chat) (err error)

func (*Logger) Presence

func (m *Logger) Presence(pres xmpp.Presence)

func (*Logger) Restart

func (m *Logger) Restart()

func (*Logger) SelectAllText

func (m *Logger) SelectAllText() ([]ChatLogger, error)

func (*Logger) SetOption

func (m *Logger) SetOption(key, val string)

func (*Logger) ShowPage

func (m *Logger) ShowPage(w http.ResponseWriter, r *http.Request)

func (*Logger) Start

func (m *Logger) Start(bot *robot.Bot)

func (*Logger) Stop

func (m *Logger) Stop()

type Notify

type Notify struct {
	Name   string
	Allows []string
	Option map[string]string
	// contains filtered or unexported fields
}

func NewNotify

func NewNotify(name string, opt map[string]interface{}) *Notify

func (*Notify) Chat

func (m *Notify) Chat(msg xmpp.Chat)

func (*Notify) CheckEnv

func (m *Notify) CheckEnv() bool

func (*Notify) Description

func (m *Notify) Description() string

func (*Notify) GetName

func (m *Notify) GetName() string

func (*Notify) GetOptions

func (m *Notify) GetOptions() map[string]string

func (*Notify) GetSummary

func (m *Notify) GetSummary() string

func (*Notify) Help

func (m *Notify) Help() string

func (*Notify) IsAllowed

func (m *Notify) IsAllowed(ip string) bool

func (*Notify) JIDPage

func (m *Notify) JIDPage(w http.ResponseWriter, r *http.Request)

web pages

func (*Notify) ModCommand

func (m *Notify) ModCommand(cmd string, msg xmpp.Chat)

func (*Notify) Presence

func (m *Notify) Presence(pres xmpp.Presence)

func (*Notify) Restart

func (m *Notify) Restart()

func (*Notify) SetOption

func (m *Notify) SetOption(key, val string)

func (*Notify) Start

func (m *Notify) Start(bot *robot.Bot)

func (*Notify) Stop

func (m *Notify) Stop()

type Random

type Random struct {
	Name       string
	FuckPath   string
	RandomPath string
	FuckList   []string
	RandomList []string

	Option map[string]bool
	// contains filtered or unexported fields
}

func NewRandom

func NewRandom(name string, opt map[string]interface{}) *Random

func (*Random) Chat

func (m *Random) Chat(msg xmpp.Chat)

func (*Random) CheckEnv

func (m *Random) CheckEnv() bool

func (*Random) Description

func (m *Random) Description() string

func (*Random) GetName

func (m *Random) GetName() string

func (*Random) GetOptions

func (m *Random) GetOptions() map[string]string

func (*Random) GetSummary

func (m *Random) GetSummary() string

func (*Random) Help

func (m *Random) Help() string

func (*Random) Presence

func (m *Random) Presence(pres xmpp.Presence)

func (*Random) Restart

func (m *Random) Restart()

func (*Random) SetOption

func (m *Random) SetOption(key, val string)

func (*Random) Start

func (m *Random) Start(bot *robot.Bot)

func (*Random) Stop

func (m *Random) Stop()

type Tuling

type Tuling struct {
	Name string
	URL  string
	Key  string

	Option map[string]bool
	// contains filtered or unexported fields
}

func NewTuling

func NewTuling(name string, opt map[string]interface{}) *Tuling

func (*Tuling) Chat

func (m *Tuling) Chat(msg xmpp.Chat)

func (*Tuling) CheckEnv

func (m *Tuling) CheckEnv() bool

func (*Tuling) Description

func (m *Tuling) Description() string

func (*Tuling) GetAnswer

func (m *Tuling) GetAnswer(text, uid string) string

func (*Tuling) GetName

func (m *Tuling) GetName() string

func (*Tuling) GetOptions

func (m *Tuling) GetOptions() map[string]string

func (*Tuling) GetSummary

func (m *Tuling) GetSummary() string

func (*Tuling) Help

func (m *Tuling) Help() string

func (*Tuling) Presence

func (m *Tuling) Presence(pres xmpp.Presence)

func (*Tuling) Request

func (m *Tuling) Request(words, uid string) (text string, err error)

func (*Tuling) Restart

func (m *Tuling) Restart()

func (*Tuling) SetOption

func (m *Tuling) SetOption(key, val string)

func (*Tuling) Start

func (m *Tuling) Start(bot *robot.Bot)

func (*Tuling) Stop

func (m *Tuling) Stop()

type Url

type Url struct {
	Name string

	Option map[string]interface{}
	// contains filtered or unexported fields
}

func NewUrl

func NewUrl(name string, opt map[string]interface{}) *Url

func (*Url) Chat

func (m *Url) Chat(msg xmpp.Chat)

func (*Url) CheckEnv

func (m *Url) CheckEnv() bool

func (*Url) Description

func (m *Url) Description() string

func (*Url) GetHelper

func (m *Url) GetHelper(text string) string

func (*Url) GetName

func (m *Url) GetName() string

func (*Url) GetOptions

func (m *Url) GetOptions() map[string]string

func (*Url) GetSummary

func (m *Url) GetSummary() string

func (*Url) Help

func (m *Url) Help() string

func (*Url) Presence

func (m *Url) Presence(pres xmpp.Presence)

func (*Url) Restart

func (m *Url) Restart()

func (*Url) SetOption

func (m *Url) SetOption(key, val string)

func (*Url) Start

func (m *Url) Start(bot *robot.Bot)

func (*Url) Stop

func (m *Url) Stop()

Jump to

Keyboard shortcuts

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