modbot.utilities.utilities

WholesomeBot utilities

Functions

curvature(a)

Calculate curvature of a vector

delete_usernames(line)

Remove usernames from messages

get_badges(line)

Get user badges

get_line_type(line)

Get type of line from prefix

get_message(line)

Get user message from line

get_msg_id(line)

Get msg id

get_role(line)

Get user role from IRC line

get_user(line)

Get user from line

get_user_type_chatty(user)

Get user type list from symbols preceeding username

is_line_type(line_type, line)

Check if line contains the requested signal

is_user_type_chatty(user_type, user)

Determine whether user is a specific type

is_user_type_irc(user_type, line)

Check if user has requested role

none_or_float(arg)

Get none or float

none_or_int(arg)

Get none or int

none_or_str(arg)

Get none or string

parse_radiation(msg)

Get radiation time from nuke command message.

parse_time(msg)

Get time from nuke command message

prune_chars(line)

Remove some special characters from line

remove_reps(line, word_list)

Remove repetitions from messages

remove_special_chars(line)

Remove all special characters from line

simple_chars_equal(line1, line2)

Compare characters in line1 and line2

Classes

UserInfo()

Class storing user information extracted from chat message