cslbot.helpers package¶
Submodules¶
cslbot.helpers.admin module¶
cslbot.helpers.arguments module¶
-
class
cslbot.helpers.arguments.
ArgParser
(config=None, **kwargs)[source]¶ Bases:
argparse.ArgumentParser
-
class
cslbot.helpers.arguments.
ChanParser
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ Bases:
argparse.Action
-
class
cslbot.helpers.arguments.
DateParser
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ Bases:
argparse.Action
-
class
cslbot.helpers.arguments.
NickParser
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ Bases:
argparse.Action
-
class
cslbot.helpers.arguments.
TumblrParser
(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]¶ Bases:
argparse.Action
cslbot.helpers.babble module¶
cslbot.helpers.backtrace module¶
cslbot.helpers.command module¶
cslbot.helpers.config module¶
cslbot.helpers.control module¶
cslbot.helpers.core module¶
cslbot.helpers.exception module¶
cslbot.helpers.handler module¶
-
class
cslbot.helpers.handler.
BotHandler
(config, connection, channels, confdir)[source]¶ Bases:
object
-
abusecheck
(send, nick, target, limit, cmd)[source]¶ Rate-limits commands.
If a nick uses commands with the limit attr set, record the timeat which they were used.If the command is used more than limit times in aminute, ignore the nick.
-
do_args
(modargs, send, nick, target, source, name, msgtype)[source]¶ Handle the various args that modules need.
-
do_join
(cmdargs, nick, msgtype, send, c)[source]¶ Join a channel.
Checks if bot is already joined to channel.
-
do_kick
(send, target, nick, msg, slogan=True)[source]¶ Kick users.
If kick is disabled, don’t do anything.If the bot is not a op, rage at a op.Kick the user.
-
do_part
(cmdargs, nick, target, msgtype, send, c)[source]¶ Leaves a channel.
Prevent user from leaving the primary channel.
-
do_welcome
()[source]¶ Do setup when connected to server.
Join the primary channel.Join the control channel.
-
is_admin
(send, nick)[source]¶ Checks if a nick is a admin.
If the nick is not in self.admins then it’s not a admin.If NickServ hasn’t responded yet, then the admin is unverified,so assume they aren’t a admin.
-
cslbot.helpers.hook module¶
cslbot.helpers.identity module¶
cslbot.helpers.modutils module¶
-
cslbot.helpers.modutils.
safe_load
(modname)[source]¶ Load a module, logging errors instead of dying if it fails to load
Returns: None when import was successful. String is the first line of the error message
cslbot.helpers.orm module¶
-
class
cslbot.helpers.orm.
Babble
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
freq
¶
-
id
¶
-
key
¶
-
source
¶
-
target
¶
-
word
¶
-
-
class
cslbot.helpers.orm.
Babble2
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
freq
¶
-
id
¶
-
key
¶
-
source
¶
-
target
¶
-
word
¶
-
-
class
cslbot.helpers.orm.
Babble_count
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
count
¶
-
id
¶
-
key
¶
-
length
¶
-
type
¶
-
-
class
cslbot.helpers.orm.
Babble_last
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
last
¶
-
-
class
cslbot.helpers.orm.
Commands
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
channel
¶
-
command
¶
-
id
¶
-
nick
¶
-
-
class
cslbot.helpers.orm.
Ignore
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
expire
¶
-
id
¶
-
nick
¶
-
-
class
cslbot.helpers.orm.
Issues
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
accepted
¶
-
description
¶
-
id
¶
-
source
¶
-
title
¶
-
-
class
cslbot.helpers.orm.
Log
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
flags
¶
-
id
¶
-
msg
¶
-
source
¶
-
target
¶
-
time
¶
-
type
¶
-
-
class
cslbot.helpers.orm.
Notes
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
nick
¶
-
note
¶
-
pending
¶
-
submitter
¶
-
time
¶
-
-
class
cslbot.helpers.orm.
Poll_responses
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
pid
¶
-
response
¶
-
voter
¶
-
-
class
cslbot.helpers.orm.
Polls
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
accepted
¶
-
active
¶
-
deleted
¶
-
id
¶
-
question
¶
-
submitter
¶
-
-
class
cslbot.helpers.orm.
Quotes
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
accepted
¶
-
id
¶
-
nick
¶
-
quote
¶
-
submitter
¶
-
-
class
cslbot.helpers.orm.
Scores
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
nick
¶
-
score
¶
-
-
class
cslbot.helpers.orm.
Stopwatches
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
active
¶
-
elapsed
¶
-
id
¶
-
time
¶
-
-
class
cslbot.helpers.orm.
Tumblrs
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
accepted
¶
-
blogname
¶
-
id
¶
-
post
¶
-
submitter
¶
-
-
class
cslbot.helpers.orm.
UrbanBlacklist
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
word
¶
-
-
class
cslbot.helpers.orm.
Urls
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
-
id
¶
-
nick
¶
-
time
¶
-
title
¶
-
url
¶
-
cslbot.helpers.reddit module¶
cslbot.helpers.reloader module¶
cslbot.helpers.server module¶
-
class
cslbot.helpers.server.
BotNetHandler
(request, client_address, server)[source]¶ Bases:
socketserver.BaseRequestHandler
cslbot.helpers.sql module¶
-
class
cslbot.helpers.sql.
Sql
(config, confdir)[source]¶ Bases:
object
cslbot.helpers.tokens module¶
-
class
cslbot.helpers.tokens.
TranslateToken
[source]¶ Bases:
cslbot.helpers.tokens.Token
cslbot.helpers.urlutils module¶
cslbot.helpers.web module¶
cslbot.helpers.workers module¶
-
class
cslbot.helpers.workers.
Event
(event, run_on_cancel)¶ Bases:
tuple
-
event
¶ Alias for field number 0
-
run_on_cancel
¶ Alias for field number 1
-