Code: Select all
# SYNTAX (on PartyLine/DCC/CTCP/TELnet): .chanset #channel -/+checkisauth
# ----------
# PUBCMD:
# !checkisreg on|off
# ----------
# MSGCMD:
# /msg botnick checkisreg #channel on|off
# ---------- SETTINGS ----------
# Set your global trigger (default: !)
set checkisregtrig "!"
# Set global|channel access flags to enable/disable authcheck (default: o|o)
set regsetflags o|o
# Set here the string used to match registered/authenticated user's
set verifieduser "*has identified for*"
# ----- NO EDIT -----
# You may have to change the RAW numeric below to match your IRCd.
bind raw - 307 check:isreg
bind join - * join:checkisreg
bind pub - ${checkisregtrig}checkisreg authcheck:pub
bind msg - checkisreg authcheck:msg
proc isregTrigger {} {
global checkisregtrig
return $checkisregtrig
}
setudef flag checkisauth
proc join:checkisreg {nick uhost hand chan} {
if {![channel get $chan checkisauth]} {return}
if {![isbotnick $nick] && ![validuser [nick2hand $nick]]} {
putserv "WHOIS $nick"
}
}
proc check:isreg {from keyword args} {
global verifieduser
if {![string match $verifieduser $args]} {return}
set nick [lindex [split $args] 1]
foreach chan [channels] {
if {![onchan $nick $chan] || ![channel get $chan checkisauth] || [validuser [nick2hand $nick]] || [isop $nick $chan] || [isvoice $nick $chan]} {return}
putquick "MODE $chan +v $nick"
}
}
proc authcheck:pub {nick uhost hand chan arg} {
global regsetflags
if {[matchattr [nick2hand $nick] $regsetflags $chan]} {
if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: [isregTrigger]checkisreg on|off"; return}
if {[lindex [split $arg] 0] == "on"} {
if {[channel get $chan checkisauth]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already enabled."; return}
channel set $chan +checkisauth
puthelp "PRIVMSG $chan :Enabled Automatic Register Checking for $chan"
return 0
}
if {[lindex [split $arg] 0] == "off"} {
if {![channel get $chan checkisauth]} {putquick "PRIVMSG $chan :\037ERROR\037: This setting is already disabled."; return}
channel set $chan -checkisauth
puthelp "PRIVMSG $chan :Disabled Automatic Register Checking for $chan"
return 0
}
}
}
proc authcheck:msg {nick uhost hand arg} {
global botnick regsetflags
set chan [strlwr [lindex [split $arg] 0]]
if {[matchattr [nick2hand $nick] $regsetflags $chan]} {
if {[lindex [split $arg] 0] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick checkisreg #channel on|off"; return}
if {([lindex [split $arg] 1] == "") && ([string match "*#*" $arg])} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick checkisreg $chan on|off"; return}
if {[lindex [split $arg] 1] == "on"} {
if {[channel get $chan checkisauth]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already enabled."; return}
channel set $chan +checkisauth
putquick "NOTICE $nick :Enabled Automatic Register Checking for $chan"
return 0
}
if {[lindex [split $arg] 1] == "off"} {
if {![channel get $chan checkisauth]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already disabled."; return}
channel set $chan -checkisauth
putquick "NOTICE $nick :Disabled Automatic Register Checking for $chan"
return 0
}
}
}
Edited: Changed the is_reg string to match DALnetFahad wrote:Thanks so much, What kind of Logged? How I check ? and I also see when there Auto Voice bot is there they put channel +A ?
Code: Select all
proc check:isreg {from keyword args} {
global verifieduser
if {![string match $verifieduser $args]} {return}
set nick [lindex [split $args] 1]
foreach chan [channels] {
if {![onchan $nick $chan] || ![channel get $chan checkisauth] || [validuser [nick2hand $nick]] || [isop $nick $chan] || [isvoice $nick $chan] || ![regexp A [getchanmode $chan]]} {return}
putquick "MODE $chan +v $nick"
}
}
Code: Select all
# SYNTAX (on PartyLine/DCC/CTCP/TELnet): .chanset #channel -/+checkisauth
# ----------
# PUBCMD:
# !checkisreg on|off
# ----------
# MSGCMD:
# /msg botnick checkisreg #channel on|off
DALnet uses ChanServ for channel registrations, it uses NickServ for nicknames, but this code doesn't care what service is used, it performs a /whois and checks the nickname has identified/authenticated.Fahad wrote:That's fine. I don't know much about A+ mode and DALnet has only ChanServ register nicks. In UnderNet we have to Logged our selfs.
So I just have to Put this tcl in bot and running? everything is perfect here. ?
If this does /whois and voice register nicks then i no have to make changes.
This does not autovoice everyone. I made this code to not voice users already added to the bot. If you want the bot to autovoice you, then you can use:Fahad wrote:<Fahad> !checkisreg on
<@Deadite> ERROR: This setting is already enabled.
But the BOT Does not +V me when I joins.
Code: Select all
.chattr yourhandle |v #channel
.chanset #channel +autovoice
Code: Select all
.chattr yourhandle |g #channel
Code: Select all
[validuser [nick2hand $nick]]
The above error seems to be due to an extra argument being included in the code, when it shouldn't have been. It has been edited and should be fine now, if you want to check the original post to reference the join:checkisregFahad wrote: <Deadite> [10:33:26] Tcl error [join:checkisreg]: wrong # args: should be "join:checkisreg nick uhost hand chan arg"
Yes, that is how I made it. If you have channel access or access to bot, it won't voice.Fahad wrote:No, I don't want bot to Auto Voice me, I am channel Founder i only sit on my channels and I have all famous channels on DALnet... I want my register users get voice. But i see one register user who never get voice. Even bot was on...
<@Fahad> !checkisreg on
‹@Deadite› ERROR: This setting is already enabled.
* JAZI (Elite12490@ipv6.8.omega.elitebnc.org) has joined #ChatWorld
????
Huh? I can't explain it any more simpler than I already have. It does exactly what you wanted..Fahad wrote:Then how it will works ?