Hecker Perl skrip to check ur UnrealIRCd config for mistakes/errors

Wazakindjes 60e059e56f Added editorc0nfig =] 1 year ago
conf cf99647c6c Added example config dir 6 years ago
.editorconfig 60e059e56f Added editorc0nfig =] 1 year ago
.gitignore 50f15d51fe Updated gitignore 6 years ago
LICENSE 84ffd45eb4 Repo creation 6 years ago
README.md f91a17bcb0 Tfw markdown sucks ass 6 years ago
checkem.pl b37f64cb84 checkem.pl: Added a bunch of checks, also documented that shit =] 6 years ago

README.md

Introduction

I figured it might be lelz to write a script that picks out common configuration mistakes (or downright errors) and tells you wat do. =]
Shit's written in Perl so you'll have to install that, possibly along with the WWW::Mechanize and Storable modules.
Also, it only works on l00nix-like OSes as it creates a tempfile in /tmp if you pass it a URL.

This shit also assumes you're working with remote includes (and you should) so your configs are properly divided up. Refer to the conf directory for some examples, these should always pass testing if unmodified.

The script takes into account that services should be linked as a hub, otherwise /msg OperServ JUPE <serv> causes Anope (and possibly other services) to shit itself.

It may not be completely finished yet, there will probably be some checks missing but I'll add them as I find them. =]

Usage

Syntax: ./checkem.pl <file/URL> [config type]

Valid config types:

  • network (default): Contains shit like (default) includes, module loads, client/server listen blocks, etc
  • hub: Contains me and link blocks, optionally with a listen { } block bound to 127.0.0.1 for premium services -- also (local) O:lines
  • leaf: Should contain only me and link blocks really, may also contain (local) O:lines
  • opers: Global O:lines only

Example output

After config modifications obv

./checkem.pl conf/hub.conf hub

Checking 'conf/hub.conf' with config type 'hub' imo tbh

ERRORS
    * incoming::mask and outgoing::hostname don't match for 'link kek.ayylm.ao'

WARNINGS
    * No directive 'ssl' in block 'link kek.ayylm.ao::outgoing::options'

REMINDERS
    * Due to the nature of this script, port numbers can't be reliably verified, so make sure to checkem manually imo tbh fam

./checkem.pl conf/leaf.conf leaf

Checking 'conf/leaf.conf' with config type 'leaf' imo tbh

WARNINGS
    * No 'link' blocks found, r u sure this is what you want?

REMINDERS
    * Due to the nature of this script, port numbers can't be reliably verified, so make sure to checkem manually imo tbh fam

./checkem.pl conf/operinfo.conf opers

Checking 'conf/operinfo.conf' with config type 'opers' imo tbh

WARNINGS
    * You'll probably wanna use 'require-modes z' in 'oper hhhhhh' (require SSL to oper up)

./checkem.pl conf/netw0rk.conf network

Checking 'conf/netw0rk.conf' with config type 'network' imo tbh
Ayyyy, good shit fam =]]]

REMINDERS
    * Due to the nature of this script, port numbers can't be reliably verified, so make sure to checkem manually imo tbh fam