bot

package
v0.0.0-...-7890bd5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2015 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const PASS_SHA256 = `114ac7740c0b09ce0c97dd44f04aa8fae156a4221dc7e03a48f64072adfd81b8`
View Source
const PS1 = "--FoObOt--"

Variables

This section is empty.

Functions

func FD_ISSET

func FD_ISSET(sysfd int, set *syscall.FdSet) bool

func FD_SET

func FD_SET(sysfd int, set *syscall.FdSet)

func FD_ZERO

func FD_ZERO(set *syscall.FdSet)

Types

type AuthModule

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

func NewAuthModule

func NewAuthModule() *AuthModule

func (*AuthModule) Add

func (a *AuthModule) Add(user string)

func (*AuthModule) CMD_

func (a *AuthModule) CMD_(msg *proto.Msg) string

func (*AuthModule) CMD_add

func (a *AuthModule) CMD_add(msg *proto.Msg) string

func (*AuthModule) CMD_list

func (a *AuthModule) CMD_list(msg *proto.Msg) string

func (*AuthModule) CMD_rm

func (a *AuthModule) CMD_rm(msg *proto.Msg) string

func (*AuthModule) Handle

func (a *AuthModule) Handle(msg *proto.Msg) string

func (*AuthModule) Login

func (a *AuthModule) Login(user string, pass string) bool

func (*AuthModule) Rm

func (a *AuthModule) Rm(user string)

func (*AuthModule) Verify

func (a *AuthModule) Verify(user string) bool

type Bot

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

func NewBot

func NewBot() *Bot

func (*Bot) AddModule

func (b *Bot) AddModule(cmd string, module proto.Interpreter)

func (*Bot) AddProto

func (b *Bot) AddProto(name string, proto proto.Proto)

func (*Bot) GetModules

func (b *Bot) GetModules() map[string]proto.Interpreter

func (*Bot) Handle

func (b *Bot) Handle(msg *proto.Msg) string

func (*Bot) Run

func (b *Bot) Run()

func (*Bot) StartProto

func (b *Bot) StartProto(name string)

type HelpModule

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

func NewHelpModule

func NewHelpModule(bot *Bot) *HelpModule

func (*HelpModule) CMD_

func (m *HelpModule) CMD_(msg *proto.Msg) string

func (*HelpModule) Handle

func (m *HelpModule) Handle(msg *proto.Msg) string

type Info

type Info struct {
}

func NewInfoModule

func NewInfoModule() *Info

func (*Info) CMD_

func (i *Info) CMD_(msg *proto.Msg) string

func (*Info) CMD_env

func (i *Info) CMD_env(msg *proto.Msg) string

func (*Info) CMD_help

func (i *Info) CMD_help(msg *proto.Msg) string

func (*Info) Handle

func (i *Info) Handle(msg *proto.Msg) string

type Run

type Run struct {
}

func NewRunModule

func NewRunModule() *Run

func (*Run) CMD_

func (r *Run) CMD_(msg *proto.Msg) string

func (*Run) Handle

func (r *Run) Handle(msg *proto.Msg) string

type Shell

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

func NewShell

func NewShell() *Shell

func (*Shell) Insert

func (sh *Shell) Insert(line string) string

func (*Shell) Interrupt

func (sh *Shell) Interrupt()

func (*Shell) Kill

func (sh *Shell) Kill()

func (*Shell) Start

func (sh *Shell) Start()

type ShellModule

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

func NewShellModule

func NewShellModule() *ShellModule

func (*ShellModule) CMD_

func (m *ShellModule) CMD_(msg *proto.Msg) string

func (*ShellModule) CMD__int

func (m *ShellModule) CMD__int(msg *proto.Msg) string

func (*ShellModule) CMD__kill

func (m *ShellModule) CMD__kill(msg *proto.Msg) string

func (*ShellModule) CMD__list

func (m *ShellModule) CMD__list(msg *proto.Msg) string

func (*ShellModule) Handle

func (m *ShellModule) Handle(msg *proto.Msg) string

Jump to

Keyboard shortcuts

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