Documentation ¶
Index ¶
- Constants
- type Admin
- func (m *Admin) AdminCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) BotCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) Chat(msg xmpp.Chat)
- func (m *Admin) CheckEnv() bool
- func (m *Admin) CronCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) Description() string
- func (m *Admin) GetCmdString(cmd string) string
- func (m *Admin) GetName() string
- func (m *Admin) GetOptions() map[string]string
- func (m *Admin) GetRooms() []*Room
- func (m *Admin) GetSummary() string
- func (m *Admin) HasPerm(name string, msg xmpp.Chat) bool
- func (m *Admin) Help() string
- func (m *Admin) HelpCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) IsAdminID(jid string) bool
- func (m *Admin) IsCmd(text string) bool
- func (m *Admin) IsFriendID(jid string) bool
- func (m *Admin) IsRoomID(jid string) bool
- func (m *Admin) IsSysAdminID(jid string) bool
- func (m *Admin) LoginTime() time.Time
- func (m *Admin) PluginCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) Presence(pres xmpp.Presence)
- func (m *Admin) Restart()
- func (m *Admin) RoomCommand(cmd string, msg xmpp.Chat)
- func (m *Admin) SetOption(key, val string)
- func (m *Admin) SetPerm(name string, perm int)
- func (m *Admin) ShowPerm(name string) string
- func (m *Admin) Start(bot *Bot)
- func (m *Admin) Stop()
- type AdminIface
- type Bot
- func (b *Bot) AddHandler(mod, path string, handler http.HandlerFunc, name string)
- func (b *Bot) AddPlugin(name string)
- func (b *Bot) ApproveSubscription(jid string)
- func (b *Bot) BlockRemote(msg xmpp.Chat) bool
- func (b *Bot) Called(msg xmpp.Chat) (ok bool, text string)
- func (b *Bot) Chat(chat xmpp.Chat)
- func (b *Bot) DelHandler(mod, name string)
- func (b *Bot) GetCmdString(cmd string) string
- func (b *Bot) GetConfig() config.Config
- func (b *Bot) GetCron() *cron.Cron
- func (b *Bot) GetPluginByName(name string) PluginIface
- func (b *Bot) GetPluginOption(name string) map[string]interface{}
- func (b *Bot) GetPlugins() []PluginIface
- func (b *Bot) HasPerm(name string, msg xmpp.Chat) bool
- func (b *Bot) Init(f NewFunc)
- func (b *Bot) InviteToMUC(jid, roomid, reason string)
- func (b *Bot) IsAdminID(jid string) bool
- func (b *Bot) IsCmd(text string) bool
- func (b *Bot) IsRoomID(jid string) bool
- func (b *Bot) JoinMUC(jid, nickname string)
- func (b *Bot) JoinProtectedMUC(jid, nickname, password string)
- func (b *Bot) LeaveMUC(jid string)
- func (b *Bot) Presence(presence xmpp.Presence)
- func (b *Bot) RemovePlugin(name string)
- func (b *Bot) ReplyAuto(recv xmpp.Chat, text string)
- func (b *Bot) ReplyPub(recv xmpp.Chat, text string)
- func (b *Bot) RequestSubscription(jid string)
- func (b *Bot) Restart()
- func (b *Bot) RevokeSubscription(jid string)
- func (b *Bot) Roster() error
- func (b *Bot) Run(quit chan<- bool)
- func (b *Bot) SendAuto(to, text string)
- func (b *Bot) SendHtml(chat xmpp.Chat)
- func (b *Bot) SendPub(to, text string)
- func (b *Bot) SentThis(msg xmpp.Chat) bool
- func (b *Bot) SetPerm(name string, perm int)
- func (b *Bot) SetRobert(jid string) (n int, err error)
- func (b *Bot) SetRoomNick(r *Room, nick string) (n int, err error)
- func (b *Bot) SetStatus(status, info string) (n int, err error)
- func (b *Bot) ShowPerm(name string) string
- func (b *Bot) Start()
- func (b *Bot) Stop()
- type CronEntry
- type NewFunc
- type PluginIface
- type Room
- type WebServer
Constants ¶
View Source
const ( ChatTalk = 1 RoomTalk = 2 AllTalk = 3 AdminPerm = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct { Name string Option map[string]interface{} Rooms []*Room Friends []string // contains filtered or unexported fields }
func (*Admin) Description ¶
func (*Admin) GetCmdString ¶
func (*Admin) GetOptions ¶
func (*Admin) GetSummary ¶
func (*Admin) IsFriendID ¶
func (*Admin) IsSysAdminID ¶
type AdminIface ¶
type AdminIface interface { GetRooms() []*Room IsAdminID(jid string) bool IsFriendID(jid string) bool IsCmd(text string) bool IsRoomID(jid string) bool GetCmdString(cmd string) string LoginTime() time.Time HasPerm(name string, msg xmpp.Chat) bool ShowPerm(name string) string SetPerm(name string, perm int) }
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) AddHandler ¶
func (b *Bot) AddHandler(mod, path string, handler http.HandlerFunc, name string)
func (*Bot) ApproveSubscription ¶
func (*Bot) DelHandler ¶
func (*Bot) GetCmdString ¶
func (*Bot) GetPluginOption ¶
func (*Bot) GetPlugins ¶
func (b *Bot) GetPlugins() []PluginIface
func (*Bot) InviteToMUC ¶
func (*Bot) JoinProtectedMUC ¶
func (*Bot) Presence ¶
func (b *Bot) Presence(presence xmpp.Presence)
Interface(), 模块收到Presence消息时的处理
func (*Bot) RequestSubscription ¶
func (*Bot) RevokeSubscription ¶
type NewFunc ¶
type NewFunc func(name string, opt map[string]interface{}) PluginIface
type PluginIface ¶
Click to show internal directories.
Click to hide internal directories.