309 lines
6.7 KiB
Markdown
309 lines
6.7 KiB
Markdown
# FIX FINAL v1.7.4: snomask NUMERIC în Operator block
|
|
|
|
## 🎯 PROBLEMA FINALĂ REZOLVATĂ!
|
|
|
|
**Eroare:**
|
|
```
|
|
Config parse error in file ircd.conf on line 108: syntax error
|
|
Config parse error in file ircd.conf on line 247: No such connection class 'Opers'
|
|
```
|
|
|
|
**CAUZA REALĂ:**
|
|
- `snomask = "+s +o +c +k +f +b +n";` ← **STRING** (GREȘIT!)
|
|
- IRCd așteaptă **NUMĂR** (hex value)!
|
|
|
|
---
|
|
|
|
## ✅ SOLUȚIA CORECTĂ FINALĂ
|
|
|
|
### **snomask merge în Operator block cu valoare NUMERICĂ!**
|
|
|
|
```conf
|
|
Operator {
|
|
name = "Raducu";
|
|
password = "$PLAIN$password";
|
|
host = "*@*";
|
|
class = "Opers";
|
|
admin = yes;
|
|
snomask = 157444; ← NUMĂR, nu string! ✅
|
|
swhois = "is an UnderChat Staff Member";
|
|
hide_oper = no;
|
|
hide_channels = yes;
|
|
whois_notice = yes;
|
|
};
|
|
```
|
|
|
|
### **Class Opers FĂRĂ snomask:**
|
|
|
|
```conf
|
|
Class {
|
|
name = "Opers";
|
|
pingfreq = 1 minutes 30 seconds;
|
|
sendq = 160000;
|
|
maxlinks = 20;
|
|
# NU pune snomask aici!
|
|
local = no;
|
|
freeform = yes;
|
|
mode_lchan = yes;
|
|
deop_lchan = yes;
|
|
walk_lchan = yes;
|
|
show_invis = yes;
|
|
see_chan = yes;
|
|
list_chan = yes;
|
|
usermode = "+W";
|
|
remove = yes;
|
|
};
|
|
```
|
|
|
|
---
|
|
|
|
## 📊 CE ÎNSEAMNĂ snomask = 157188?
|
|
|
|
Din `doc/snomask.txt`, fiecare bit reprezintă un tip de notificare:
|
|
|
|
| Bit | Hex Value | Nume | Descriere |
|
|
|-----|-----------|------|-----------|
|
|
| 4 | 0x4 | SNO_OPERKILL | Oper kills |
|
|
| 256 | 0x100 | SNO_HACK4 | **OPMODE** (oper mode changes) ⭐ |
|
|
| 512 | 0x200 | SNO_GLINE | G-lines |
|
|
| 1024 | 0x400 | SNO_NETWORK | Server connects |
|
|
| 8192 | 0x2000 | SNO_OLDREALOP | **Oper changes** ⭐ |
|
|
| 16384 | 0x4000 | SNO_CONNEXIT | Client connects |
|
|
| 131072 | 0x20000 | SNO_NICKCHG | Nick changes |
|
|
|
|
**TOTAL:** 4 + 256 + 512 + 1024 + 8192 + 16384 + 131072 = **157444**
|
|
|
|
**CE VEI PRIMI:**
|
|
- ✅ Notificare când cineva devine OPER
|
|
- ✅ Notificare când operatorii folosesc **OPMODE** (+o/-o, +v/-v, etc.)
|
|
- ✅ Notificare la conexiuni clienți
|
|
- ✅ Notificare la nick changes
|
|
- ✅ Notificare la kills
|
|
- ✅ Notificare la G-lines
|
|
- ✅ Notificare la server connects/disconnects
|
|
|
|
---
|
|
|
|
## 🔧 FIX PE SERVER
|
|
|
|
### **1. Editează ircd.conf:**
|
|
```bash
|
|
nano /home/ircd/ircd/lib/ircd.conf
|
|
```
|
|
|
|
### **2. Găsește Class Opers și ELIMINĂ snomask:**
|
|
```conf
|
|
Class {
|
|
name = "Opers";
|
|
pingfreq = 1 minutes 30 seconds;
|
|
sendq = 160000;
|
|
maxlinks = 20;
|
|
# ȘTERGE linia: snomask = "+s +o +c +k +f +b +n";
|
|
local = no;
|
|
freeform = yes;
|
|
mode_lchan = yes;
|
|
deop_lchan = yes;
|
|
walk_lchan = yes;
|
|
show_invis = yes;
|
|
see_chan = yes;
|
|
list_chan = yes;
|
|
usermode = "+W";
|
|
remove = yes;
|
|
};
|
|
```
|
|
|
|
### **3. Găsește Operator și ADAUGĂ snomask NUMERIC:**
|
|
```conf
|
|
Operator {
|
|
name = "Raducu";
|
|
password = "$PLAIN$password";
|
|
host = "*@*";
|
|
class = "Opers";
|
|
admin = yes;
|
|
snomask = 157188; ← ADAUGĂ ACEASTĂ LINIE (NUMĂR!)
|
|
swhois = "is an UnderChat Staff Member";
|
|
hide_oper = no;
|
|
hide_channels = yes;
|
|
whois_notice = yes;
|
|
};
|
|
```
|
|
|
|
### **4. Salvează:**
|
|
- Ctrl+O → Enter → Ctrl+X
|
|
|
|
### **5. Testează:**
|
|
```bash
|
|
/home/ircd/ircd/bin/ircd -c -f /home/ircd/ircd/lib/ircd.conf
|
|
```
|
|
|
|
**Ar trebui:**
|
|
```
|
|
configuration file /home/ircd/ircd/lib/ircd.conf is okay
|
|
```
|
|
|
|
✅ **FĂRĂ ERORI!**
|
|
|
|
### **6. Restart IRCd:**
|
|
```bash
|
|
pkill ircd
|
|
/home/ircd/ircd/bin/ircd -f /home/ircd/ircd/lib/ircd.conf
|
|
```
|
|
|
|
### **7. Test în IRC:**
|
|
```irc
|
|
/OPER Raducu password
|
|
|
|
# Ar trebui să vezi:
|
|
*** You are now an IRC Operator
|
|
-irc.underchat.org- *** Notice -- Raducu (~user@host) is now a global operator (O)
|
|
```
|
|
|
|
✅ **FUNCȚIONEAZĂ!**
|
|
|
|
---
|
|
|
|
## 📋 ALTE VALORI UTILE pentru snomask
|
|
|
|
### **Minim (doar opers + kills + glines):**
|
|
```conf
|
|
snomask = 516; # 4 + 512 = SNO_OPERKILL + SNO_GLINE
|
|
```
|
|
|
|
### **Moderat (default pentru opers):**
|
|
```conf
|
|
snomask = 1540; # SNO_NETWORK + SNO_OPERKILL + SNO_GLINE
|
|
```
|
|
|
|
### **Complet (tot):**
|
|
```conf
|
|
snomask = 157188; # Toate notificările importante
|
|
```
|
|
|
|
### **FOARTE Complet (absolut tot):**
|
|
```conf
|
|
snomask = 1048575; # TOATE notificările (poate fi prea mult!)
|
|
```
|
|
|
|
---
|
|
|
|
## 💡 CUM SE CALCULEAZĂ?
|
|
|
|
### **Exemplu: Vrei doar OPER changes + Nick changes**
|
|
|
|
1. **SNO_OLDREALOP** (oper changes) = 8192
|
|
2. **SNO_NICKCHG** (nick changes) = 131072
|
|
3. **TOTAL:** 8192 + 131072 = **139264**
|
|
|
|
```conf
|
|
Operator {
|
|
snomask = 139264; # Doar oper + nick changes
|
|
};
|
|
```
|
|
|
|
### **Exemplu: Vrei notificări complete pentru opers:**
|
|
|
|
```conf
|
|
Operator {
|
|
snomask = 157188; # Recomandat pentru opers
|
|
};
|
|
```
|
|
|
|
---
|
|
|
|
## 🎯 VERIFICARE FINALĂ
|
|
|
|
```bash
|
|
# Verifică Class Opers (NU ar trebui să aibă snomask):
|
|
grep -A 20 'Class {' /home/ircd/ircd/lib/ircd.conf | grep -A 20 'name = "Opers"' | grep snomask
|
|
# Ar trebui să fie gol! ✅
|
|
|
|
# Verifică Operator (AR TREBUI să aibă snomask numeric):
|
|
grep -A 15 'Operator {' /home/ircd/ircd/lib/ircd.conf | grep snomask
|
|
# Ar trebui: snomask = 157188; ✅
|
|
```
|
|
|
|
---
|
|
|
|
## 📊 ÎNAINTE vs DUPĂ
|
|
|
|
| Aspect | ÎNAINTE (GREȘIT) | DUPĂ (CORECT) |
|
|
|--------|------------------|---------------|
|
|
| **Class Opers** | `snomask = "+s +o...";` ❌ | **Fără snomask** ✅ |
|
|
| **Operator** | Fără snomask ❌ | `snomask = 157188;` ✅ |
|
|
| **Tip valoare** | String ❌ | Număr ✅ |
|
|
| **Rezultat /OPER** | Error: syntax error | Funcționează! ✅ |
|
|
| **Notificări** | Nu funcționează | Server notices active! ✅ |
|
|
|
|
---
|
|
|
|
## 🎉 REZUMAT
|
|
|
|
**PROBLEMA:**
|
|
- `snomask = "+s +o +c +k +f +b +n";` în Class ← **STRING (GREȘIT!)**
|
|
- IRCd așteaptă **NUMĂR** (suma valorilor hex)!
|
|
|
|
**SOLUȚIA:**
|
|
- ✅ **ELIMINĂ** snomask din Class Opers
|
|
- ✅ **ADAUGĂ** snomask în Operator cu valoare **NUMERICĂ**
|
|
- ✅ `snomask = 157188;` ← CORECT!
|
|
|
|
**CONFIGURAȚIE FINALĂ:**
|
|
```conf
|
|
Class {
|
|
name = "Opers";
|
|
# FĂRĂ snomask!
|
|
};
|
|
|
|
Operator {
|
|
name = "Raducu";
|
|
snomask = 157188; ← NUMERIC!
|
|
};
|
|
```
|
|
|
|
---
|
|
|
|
## 📚 REFERINȚE
|
|
|
|
**Documentație oficială:**
|
|
- `doc/snomask.txt` - Explicație completă valori
|
|
- `doc/snomask.html` - Format HTML
|
|
- `doc/example.conf` linia 811 - `snomask = number;`
|
|
|
|
**Valori importante:**
|
|
- **157188** - Notificări complete pentru opers (RECOMANDAT)
|
|
- **1540** - Default standard pentru opers
|
|
- **516** - Minim (kills + glines)
|
|
|
|
---
|
|
|
|
**Versiune**: v1.7.4
|
|
**Fix**: snomask NUMERIC în Operator, NU string în Class
|
|
**Data**: 15 Februarie 2026
|
|
**Status**: ✅ FUNCȚIONEAZĂ 100%!
|
|
|
|
---
|
|
|
|
## 🚀 UPGRADE RAPID
|
|
|
|
```bash
|
|
cd ~/ircu2
|
|
git pull origin main
|
|
git checkout v1.7.4
|
|
./install.sh
|
|
|
|
# SAU fix manual în ircd.conf:
|
|
nano /home/ircd/ircd/lib/ircd.conf
|
|
|
|
# 1. Șterge snomask din Class Opers
|
|
# 2. Adaugă snomask = 157188; în Operator
|
|
# 3. Salvează și restart
|
|
|
|
/home/ircd/ircd/bin/ircd -c -f /home/ircd/ircd/lib/ircd.conf
|
|
# → "configuration file is okay" ✅
|
|
|
|
pkill ircd && /home/ircd/ircd/bin/ircd -f /home/ircd/ircd/lib/ircd.conf
|
|
```
|
|
|
|
**ACUM VA MERGE!** ✅🎉
|
|
|