|
| 1 | +# Contributing to e2e.dll |
| 2 | + |
| 3 | +Thank you for your interest in contributing to e2e.dll! This document provides guidelines for contributing to the project. |
| 4 | + |
| 5 | +## How to Contribute |
| 6 | + |
| 7 | +### Reporting Bugs |
| 8 | + |
| 9 | +If you find a bug, please create an issue with: |
| 10 | +- A clear, descriptive title |
| 11 | +- Steps to reproduce the problem |
| 12 | +- Expected vs actual behavior |
| 13 | +- Your mIRC version and Windows version |
| 14 | +- Any relevant log files from `e2e.logs` |
| 15 | + |
| 16 | +### Suggesting Features |
| 17 | + |
| 18 | +Feature suggestions are welcome! Please: |
| 19 | +- Check if the feature has already been suggested |
| 20 | +- Provide a clear use case |
| 21 | +- Explain how it would benefit users |
| 22 | +- Consider security implications |
| 23 | + |
| 24 | +### Pull Requests |
| 25 | + |
| 26 | +1. **Fork the repository** |
| 27 | +2. **Create a feature branch**: `git checkout -b feature/your-feature-name` |
| 28 | +3. **Make your changes**: |
| 29 | + - Follow existing code style |
| 30 | + - Add comments for complex logic |
| 31 | + - Test thoroughly in mIRC |
| 32 | +4. **Commit your changes**: Use clear, descriptive commit messages |
| 33 | +5. **Push to your fork**: `git push origin feature/your-feature-name` |
| 34 | +6. **Open a Pull Request** |
| 35 | + |
| 36 | +### Code Guidelines |
| 37 | + |
| 38 | +#### C Code (`e2e.c`, `e2e_keyex.c`) |
| 39 | +- Use consistent indentation (tabs or 4 spaces) |
| 40 | +- Check all DLL function return values for errors |
| 41 | +- Use `ERROR:` prefix for error returns |
| 42 | +- Add error logging for debugging |
| 43 | +- Keep functions focused and modular |
| 44 | + |
| 45 | +#### mIRC Script (`e2e.mrc`) |
| 46 | +- Use meaningful variable names (`%net`, `%chan`, `%nick`) |
| 47 | +- Add logging for important operations (`e2e_log`) |
| 48 | +- Check for null/empty parameters |
| 49 | +- Use helper functions to avoid code duplication |
| 50 | +- Test in both channel and query contexts |
| 51 | + |
| 52 | +### Security |
| 53 | + |
| 54 | +- **Never commit keys or credentials** |
| 55 | +- Report security vulnerabilities privately |
| 56 | +- Use libsodium functions correctly |
| 57 | +- Validate all user input |
| 58 | +- Handle errors securely (fail-secure, not fail-open) |
| 59 | + |
| 60 | +### Testing |
| 61 | + |
| 62 | +Before submitting a PR, test: |
| 63 | +- ✅ DM key exchange (offer, accept, reject) |
| 64 | +- ✅ Channel key generation and sharing |
| 65 | +- ✅ Encrypted message sending/receiving |
| 66 | +- ✅ Auto-encrypt functionality |
| 67 | +- ✅ Key persistence (DPAPI and password modes) |
| 68 | +- ✅ Error handling (missing keys, invalid data) |
| 69 | +- ✅ Menu actions work correctly |
| 70 | + |
| 71 | +### Build Requirements |
| 72 | + |
| 73 | +- Visual Studio 2022 or later (v143 toolset) |
| 74 | +- libsodium 1.0.20 (included in repo) |
| 75 | +- Win32 (32-bit) target platform |
| 76 | + |
| 77 | +Build command: |
| 78 | +```cmd |
| 79 | +MSBuild e2e.vcxproj /p:Configuration=Release /p:Platform=Win32 |
| 80 | +``` |
| 81 | + |
| 82 | +### Documentation |
| 83 | + |
| 84 | +When adding features: |
| 85 | +- Update `README.md` with usage examples |
| 86 | +- Update command list in `e2e.mrc` header |
| 87 | +- Update `/e2e help` output if needed |
| 88 | + |
| 89 | +## Code of Conduct |
| 90 | + |
| 91 | +Be respectful and constructive. We're all here to improve mIRC security together. |
| 92 | + |
| 93 | +## Questions? |
| 94 | + |
| 95 | +If you have questions about contributing, feel free to open an issue with the `question` label. |
| 96 | + |
| 97 | +## License |
| 98 | + |
| 99 | +By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE.txt). |
0 commit comments