This is a simple IRC bot written in Python. The bot connects to an IRC server, joins a specified channel, and responds to various commands. It provides basic moderation features such as greeting users, kicking and banning users, clearing chat history, and displaying bot status.
- Python 3.x
- socket module
-
Clone the repository:
git clone https://github.com/mrfoxie/ircbot.git
-
Navigate to the project directory:
cd ircbot
-
Open
main.py
and modify the following variables according to your desired IRC server and channel:server = "irc.libera.chat" port = 6667 channel = "#HackerIdiot" bot_name = "HackerIdiot_bot"
-
Run the bot:
python main.py
-
The bot will connect to the IRC server, join the specified channel, and start listening for commands.
!greet
: Greets the user with a welcome message.!help
: Displays a list of available commands.!status
: Shows the bot's uptime and the number of connected users.!kick <user>
: Kicks the specified user from the channel (requires operator privileges).!ban <user>
: Bans the specified user from the channel (requires operator privileges).!clear
: Clears the chat history (requires operator privileges).
Contributions are welcome! If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b my-new-feature
- Make your changes and commit them:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
This project is licensed under the MIT License.