osterman

Channel moderation bot. Manages bans, kicks, mutes, auto-modes, content filters, and idle tracking.

Dependencies

No external libraries required.

Plugins

FileRole
protect.pySetup, passive protection: flood, caps, repeat, badword, clone, join flood
commands.pyAll user-facing moderation and config commands
tracking.pySQLite event log, greeting, !seen, !info, !log
idle.pyIdle detection tick, !afk, !idle
help.pyThree-level help system

Message routing

Output typeDelivery
!seen, !idle <nick> resultsChannel message
!info, !log resultsPM to nick
!ban list, !config, !filter list, !badword listPM to nick
All other command feedback (errors, confirmations)IRC NOTICE to nick
Greetings, idle warns, bad word warnIRC NOTICE to nick

Help system

!help                       list topics
!help <topic>               list commands for a topic
!help <topic> <cmd>         description and usage for a command
!help <cmd>                 description and usage (topic not required)

Topics: mod, config, track, idle, admin

Commands

Moderation (owner / ACL / op)

CommandShortDescription
!kick <nick> [reason]!kKick
`!ban <nick\mask> [reason]`!bBan + kick
!ban list!b listView channel ban list (PM)
`!bankick <nick\mask> [reason]`!bkBan + kick (explicit)
`!unban <nick\mask>`!ubRemove ban
`!tempban <nick\mask> <min> [reason]`!tbTimed ban (auto-lifts)
`!mute <nick\mask>`!muQuiet (+q)
`!unmute <nick\mask>`!umuUnquiet (-q)
!voice <nick>!vGive voice (+v)
!devoice <nick>!dvRemove voice
!op <nick>!oGive op (+o)
!deop <nick>!doRemove op
!halfop <nick>!hopGive halfop (+h)
!dehalfop <nick>!dhopRemove halfop
`!lock [m\i]`!lkLock channel (+mi, +m, or +i)
`!unlock [m\i]`!ulkUnlock channel

Auto-modes (owner / ACL / op, per channel)

CommandShortDescription
`!autoop <add\del\list> [nick\mask]`!aoAuto +o on join
`!autovoice <add\del\list> [nick\mask]`!avAuto +v on join
`!autohalfop <add\del\list> [nick\mask]`!ahopAuto +h on join

Config / lists (owner / ACL)

CommandShortDescription
`!blacklist <add\del\list> [mask]`!blGlobal ban list (all channels)
`!whitelist <add\del\list> [mask]`!wlGlobal bypass list
`!except <add\del\list> [mask]`!exPer-channel bypass list
`!acl <add\del\list> [nick]`(none)Trusted nicks (can use mod commands)
`!filter <add\del\list> [pattern]`!fPer-channel regex content filter
`!badword <add\del\list> [word]`!bwPer-channel word block list
!set <key> <value>!sSet a config value (in channel: per-channel; in PM: global)
!config [#channel]!cfgShow channel config (PM)
`!idle <on\off>`!idToggle idle detection

Tracking

CommandAuthDescription
!seen <nick>anyoneLast time nick was seen in this channel. Responds in channel. Owner/ACL may call from PM for cross-channel lookup.
!info <nick>anyoneNick summary scoped to this channel (PM). Owner/ACL may call from PM for global lookup.
!idle <nick>anyoneHow long nick has been idle in this channel. Responds in channel.
!log <nick> [n]owner / ACLFull event log for nick (PM)
!afkanyoneReset your idle timer

Admin (owner)

CommandShortDescription
!join <#channel>!jJoin a channel
!part [#channel]!pLeave a channel
!chans!cList channels

Configurable settings (!set <key> <value>)

KeyDefaultDescription
flood_threshold5Messages before flood action
flood_window_sec10Flood detection window (seconds)
caps_filter1Enable caps filter (0/1)
caps_percent70Caps percentage threshold
caps_min_len10Minimum message length to check
repeat_filter1Enable repeat filter (0/1)
repeat_threshold3Repeated messages before action
repeat_window_sec30Repeat detection window (seconds)
clone_limit2Max connections from same host
join_flood_filter1Enable join flood filter (0/1)
join_flood_count5Joins before action
join_flood_window10Join flood window (seconds)
nick_flood_filter1Enable nick flood filter (0/1)
nick_flood_count3Nick changes before action
nick_flood_window60Nick flood window (seconds)
badword_actionkickAction on badword: kick or warn
tempban_max_min60Max duration for !tempban (minutes)
idle_warn_min45Minutes idle before warning
idle_kick_min60Minutes idle before kick
log_limit6Default number of events shown by !log
greet1Send join greeting (0/1)

Config keys

KeyDescription
[osterman] db_pathPath to JSON database file