A Discord bot that provides IRC management capabilities through Discord commands. Originally designed for irc.atl.chat and All Things Linux, but configurable for other IRC networks.
- User Registration: Register new IRC users through NickServ
- User Deletion: Delete IRC users with confirmation codes
- Help System: Display available commands
- Graceful Shutdown: Proper cleanup on termination signals
- Error Handling: Comprehensive error handling and logging
- Timeout Protection: Commands have built-in timeouts to prevent hanging
- Go 1.24+
- Access to a Discord bot and its token
- An IRC account with operator privileges
-
Clone the repository:
git clone https://github.com/allthingslinux/ircBot cd ircBot
-
Install dependencies:
go mod download
-
Copy the example environment file and configure it:
cp .example.env .env
-
Fill out the
.env
file with your configuration (see Configuration section) -
Build the application:
go build -o ircBot
-
Run the bot:
./ircBot
!help
- Display available commands
├── main.go # Application entry point and configuration
├── commands/
│ ├── commands.go # Command routing and handler registration
│ └── utils.go # Shared utilities
├── go.mod # Go module definition
└── .env # Environment configuration
- Create a new file in the
commands/
directory - Implement your command handler with this signature:
func YourCommand(session *discordgo.Session, message *discordgo.MessageCreate, irccon *irc.Connection)
- Register the command in the
init()
function:func init() { CommandMap["yourcommand"] = YourCommand }
Pull requests and issues are welcome. This is a community project maintained by volunteers, so please be patient with response times.