C# Class wmib.Extensions.Infobot

Exibir arquivo Open project: benapetr/wikimedia-bot Class Usage Examples

Public Properties

Property Type Description
Aliases List
DefaultPrefix string
Keys List
NA System.DateTime
ReplyChan Channel
Sensitive bool
SnapshotManager System.Thread
datafile_raw string
datafile_xml string
pChannel Channel
prefix string
stored bool
temporary_data string
update bool

Public Methods

Method Description
AliasExists ( string name, bool sensitive = true ) : bool
CreateSnapshot ( Channel chan, string name ) : void
Find ( string key, Channel Chan ) : void
GetKey ( string name, bool sensitive = true ) : InfobotKey
Infobot ( string database, Channel channel, Module module, bool sensitive = true ) : System
InfobotDetail ( string key, Channel chan ) : void

@infobot-detail

InfobotExec ( string message, libirc user, Channel chan ) : bool

Print a value to channel if found, this message doesn't need to be a valid command for it to work

IsIgnored ( string name, Channel channel ) : bool

Determines whether this key is ignored for channel

IsValid ( string name ) : bool
KeyExists ( string name, bool sensitive = true ) : bool

Function returns true if key exists

Linkable ( Channel host, Channel guest ) : bool
LoadAncientDB ( ) : bool
LoadData ( ) : bool
RSearch ( string key, Channel Chan ) : void

Search

RecoverSnapshot ( Channel chan, string name ) : void
RecoverStart ( ) : void
Save ( ) : void

Save to a file

SetKey ( string Text, string key, string user, Channel chan, bool isact ) : void

Save a new key

SetRaw ( string key, string user, Channel chan ) : void
SnapshotStart ( ) : void
SortedItem ( ) : List
StoreDB ( ) : void

Stores all data to database delayed using different thread

UnsetRaw ( string key, string user, Channel chan ) : void

Private Methods

Method Description
DeleteKey ( string key ) : bool
DeliverKey ( InfobotKey Key, string OriginalText, Channel chan, libirc fu ) : bool
ParseInfo ( List parameters, string original, InfobotKey Key, libirc fu ) : string
RetrieveMasterDBChannel ( Channel chan ) : Channel

Retrieves the master DB channel

StartSearch ( ) : void
aliasKey ( string key, string al, string user, Channel chan, bool enforced = false ) : void

Alias

replaceKey ( string Text, string key, string user, Channel chan ) : void
rmKey ( string key, string user, Channel _ch ) : void

Method Details

AliasExists() public method

public AliasExists ( string name, bool sensitive = true ) : bool
name string
sensitive bool
return bool

CreateSnapshot() public method

public CreateSnapshot ( Channel chan, string name ) : void
chan Channel
name string
return void

Find() public method

public Find ( string key, Channel Chan ) : void
key string
Chan Channel
return void

GetKey() public method

public GetKey ( string name, bool sensitive = true ) : InfobotKey
name string
sensitive bool
return InfobotKey

Infobot() public method

public Infobot ( string database, Channel channel, Module module, bool sensitive = true ) : System
database string
channel Channel
module Module
sensitive bool
return System

InfobotDetail() public method

@infobot-detail
public InfobotDetail ( string key, Channel chan ) : void
key string
chan Channel
return void

InfobotExec() public method

Print a value to channel if found, this message doesn't need to be a valid command for it to work
public InfobotExec ( string message, libirc user, Channel chan ) : bool
message string Message
user libirc User
chan Channel Channel
return bool

IsIgnored() public method

Determines whether this key is ignored for channel
public IsIgnored ( string name, Channel channel ) : bool
name string /// If set to true name. ///
channel Channel
return bool

IsValid() public method

public IsValid ( string name ) : bool
name string
return bool

KeyExists() public method

Function returns true if key exists
public KeyExists ( string name, bool sensitive = true ) : bool
name string Name of key
sensitive bool If bot is sensitive or not
return bool

Linkable() public static method

public static Linkable ( Channel host, Channel guest ) : bool
host Channel
guest Channel
return bool

LoadAncientDB() public method

public LoadAncientDB ( ) : bool
return bool

LoadData() public method

public LoadData ( ) : bool
return bool

RSearch() public method

Search
public RSearch ( string key, Channel Chan ) : void
key string Key
Chan Channel
return void

RecoverSnapshot() public method

public RecoverSnapshot ( Channel chan, string name ) : void
chan Channel
name string
return void

RecoverStart() public method

public RecoverStart ( ) : void
return void

Save() public method

Save to a file
public Save ( ) : void
return void

SetKey() public method

Save a new key
public SetKey ( string Text, string key, string user, Channel chan, bool isact ) : void
Text string Text
key string Key
user string User who created it
chan Channel
isact bool
return void

SetRaw() public method

public SetRaw ( string key, string user, Channel chan ) : void
key string
user string
chan Channel
return void

SnapshotStart() public method

public SnapshotStart ( ) : void
return void

SortedItem() public method

public SortedItem ( ) : List
return List

StoreDB() public method

Stores all data to database delayed using different thread
public StoreDB ( ) : void
return void

UnsetRaw() public method

public UnsetRaw ( string key, string user, Channel chan ) : void
key string
user string
chan Channel
return void

Property Details

Aliases public_oe property

List of all aliases we want to use
public List Aliases
return List

DefaultPrefix public_oe static_oe property

public static string DefaultPrefix
return string

Keys public_oe property

List of all items in class
public List Keys
return List

NA public_oe static_oe property

public static DateTime,System NA
return System.DateTime

ReplyChan public_oe static_oe property

public static Channel ReplyChan
return Channel

Sensitive public_oe property

public bool Sensitive
return bool

SnapshotManager public_oe property

public Thread,System SnapshotManager
return System.Thread

datafile_raw public_oe property

Data file
public string datafile_raw
return string

datafile_xml public_oe property

public string datafile_xml
return string

pChannel public_oe property

public Channel pChannel
return Channel

prefix public_oe property

public string prefix
return string

stored public_oe property

public bool stored
return bool

temporary_data public_oe property

public string temporary_data
return string

update public_oe property

public bool update
return bool