Added all of the existing code

This commit is contained in:
2025-09-27 14:43:52 +01:00
commit 6772bfd842
58 changed files with 19587 additions and 0 deletions

150
configs/config.json Normal file
View File

@@ -0,0 +1,150 @@
{
"server": {
"name": "TechIRCd",
"network": "TechNet",
"description": "A modern IRC server written in Go",
"version": "1.0.0",
"admin_info": "admin@example.com",
"listen": {
"host": "localhost",
"port": 6667,
"ssl_port": 6697,
"enable_ssl": false
},
"ssl": {
"cert_file": "server.crt",
"key_file": "server.key",
"require_ssl": false
}
},
"limits": {
"max_clients": 1000,
"max_channels": 100,
"max_channel_users": 500,
"max_nick_length": 30,
"max_channel_length": 50,
"max_topic_length": 307,
"max_kick_length": 307,
"max_away_length": 307,
"ping_timeout": 300,
"registration_timeout": 60,
"flood_lines": 10,
"flood_seconds": 60
},
"features": {
"enable_oper": true,
"enable_services": false,
"enable_modes": true,
"enable_ctcp": true,
"enable_dcc": false,
"case_mapping": "rfc1459"
},
"privacy": {
"hide_hosts_from_users": true,
"oper_bypass_host_hide": true,
"masked_host_suffix": "users.technet"
},
"whois_features": {
"show_user_modes": {
"to_everyone": false,
"to_opers": true,
"to_self": true
},
"show_ssl_status": {
"to_everyone": true,
"to_opers": true,
"to_self": true
},
"show_idle_time": {
"to_everyone": false,
"to_opers": true,
"to_self": true
},
"show_signon_time": {
"to_everyone": false,
"to_opers": true,
"to_self": true
},
"show_real_host": {
"to_everyone": false,
"to_opers": true,
"to_self": true
},
"show_channels": {
"to_everyone": true,
"to_opers": true,
"to_self": true,
"hide_secret_channels": true,
"hide_private_channels": false,
"show_membership_levels": true
},
"show_oper_class": {
"to_everyone": false,
"to_opers": true,
"to_self": true
},
"show_client_info": {
"to_everyone": false,
"to_opers": true,
"to_self": false
},
"show_account_name": {
"to_everyone": true,
"to_opers": true,
"to_self": true
},
"show_activity_stats": false,
"show_github_integration": false,
"show_geolocation": false,
"show_performance_stats": false,
"show_device_info": false,
"show_social_graph": false,
"show_security_score": false,
"custom_fields": []
},
"channels": {
"default_modes": "+nt",
"auto_join": [
"#general"
],
"admin_channels": [
"#admin"
],
"founder_mode": "o",
"modes": {
"ban_list_size": 100,
"except_list_size": 100,
"invite_list_size": 100
}
},
"opers": [
{
"name": "admin",
"password": "your_secure_password_here",
"host": "*@localhost",
"class": "admin",
"flags": [
"global_kill",
"remote",
"connect",
"squit"
]
}
],
"oper_config": {
"config_file": "configs/opers.conf",
"enable": true
},
"motd": [
"Welcome to TechIRCd!",
"A modern IRC server written in Go",
"Enjoy your stay on TechNet!"
],
"logging": {
"level": "info",
"file": "techircd.log",
"max_size": 100,
"max_backups": 3,
"max_age": 28
}
}

117
configs/opers.conf Normal file
View File

@@ -0,0 +1,117 @@
{
"rank_names": {
"rank_1": "Helper",
"rank_2": "Moderator",
"rank_3": "Operator",
"rank_4": "Administrator",
"rank_5": "Owner"
},
"classes": [
{
"name": "helper",
"rank": 1,
"description": "Helper - Basic moderation commands",
"permissions": [
"kick",
"topic",
"mode_channel"
],
"color": "green",
"symbol": "%"
},
{
"name": "moderator",
"rank": 2,
"description": "Moderator - Channel and user management",
"permissions": [
"ban",
"unban",
"kick",
"mute",
"topic",
"mode_channel",
"mode_user",
"who_override"
],
"inherits": "helper",
"color": "blue",
"symbol": "@"
},
{
"name": "operator",
"rank": 3,
"description": "Operator - Server management commands",
"permissions": [
"kill",
"rehash",
"connect",
"squit",
"wallops",
"operwall"
],
"inherits": "moderator",
"color": "red",
"symbol": "*"
},
{
"name": "admin",
"rank": 4,
"description": "Administrator - Full server control",
"permissions": ["*"],
"color": "purple",
"symbol": "&"
},
{
"name": "owner",
"rank": 5,
"description": "Server Owner - Ultimate authority",
"permissions": [
"*",
"shutdown",
"restart"
],
"color": "gold",
"symbol": "~"
}
],
"opers": [
{
"name": "admin",
"password": "changeme_please",
"host": "*@localhost",
"class": "admin",
"flags": [],
"max_clients": 1000,
"contact": "admin@example.com",
"last_seen": ""
},
{
"name": "helper1",
"password": "helper_password",
"host": "*@192.168.1.*",
"class": "helper",
"flags": [],
"max_clients": 100,
"contact": "helper@example.com",
"last_seen": ""
}
],
"settings": {
"require_ssl": false,
"max_failed_attempts": 3,
"lockout_duration_minutes": 30,
"allowed_commands": [
"OPER",
"KILL",
"REHASH",
"WALLOPS",
"OPERWALL",
"CONNECT",
"SQUIT"
],
"log_oper_actions": true,
"notify_on_oper_up": true,
"auto_expire_inactive_days": 365,
"require_two_factor": false
}
}

53
configs/services.json Normal file
View File

@@ -0,0 +1,53 @@
{
"enable": true,
"nickserv": {
"enable": true,
"nick": "NickServ",
"user": "services",
"host": "services.techircd.net",
"realname": "Nickname Registration Service",
"expire_time": 30,
"identify_timeout": 60,
"email_verify": false,
"restrict_registration": false
},
"chanserv": {
"enable": true,
"nick": "ChanServ",
"user": "services",
"host": "services.techircd.net",
"realname": "Channel Registration Service",
"expire_time": 30,
"max_channels": 20,
"auto_deop": true
},
"operserv": {
"enable": true,
"nick": "OperServ",
"user": "services",
"host": "services.techircd.net",
"realname": "Operator Service"
},
"memoserv": {
"enable": true,
"nick": "MemoServ",
"user": "services",
"host": "services.techircd.net",
"realname": "Memo Service",
"max_memos": 50,
"memo_expire": 365
},
"database": {
"enable": true,
"type": "mysql",
"database": "techircd_services",
"host": "localhost",
"port": 3306,
"username": "techircd",
"password": "changeme",
"options": {
"charset": "utf8mb4",
"parseTime": "true"
}
}
}