| View previous topic :: View next topic |
| Author |
Message |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 6:30 am Post subject: |
|
|
| caesar wrote: | | Too lazy to follow some example or what part you haven't understood? |
I understand, I just don't understand what should i edit.
you edit and give me |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Fri Mar 24, 2017 9:08 am Post subject: |
|
|
i tested the tcl again this time in multi channels and it turns out this will only run in 1 channel
this is what i use so far:
| Code: | # 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 n|n
# Set here the string used to match registered/authenticated user's
set verifieduser "*is a registered nick*"
# ----- 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 pub - !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 "NOTICE $nick :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 "NOTICE $nick :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
}
}
} |
|
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 9:33 am Post subject: |
|
|
| I Suggest you to write for all channels. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 9:35 am Post subject: |
|
|
| I am not saying about myself. NEW Users are not getting Voice in other channels. You need to Edit it again for all channels. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Mar 24, 2017 2:16 pm Post subject: |
|
|
I thought someone told you to not use return in this foreach chan loop:) | Code: | 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"
} |
Try: | Code: | foreach chan [channels] {
if {![onchan $nick $chan] || ![channel get $chan checkisauth] || [validuser [nick2hand $nick]] || [isop $nick $chan] || [isvoice $nick $chan]} {continue}
putquick "MODE $chan +v $nick"
} |
EDIT: Actually Caesar has that issue covered in more detail earlier in this thread. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 2:21 pm Post subject: |
|
|
| It Will Work On All channels? Can you Edit TCL and Post it for me if you don't mind. Because i don't want to make any mistake again. you can have tcl up |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Mar 24, 2017 2:33 pm Post subject: |
|
|
| Quote: | | It Will Work On All channels? | I have no idea, I just know the script would have to work better without silly coding errors. Until you give it try, none of us will ever know...
| Quote: | | Can you Edit TCL and Post it for me if you don't mind. | Caesar and I have already showed some possible patches to maybe fix your script. Now it is a simple copy paste thing. Report back here with any specific errors.
| Quote: | | Because i don't want to make any mistake again. | Mistakes are how we learn. It's just a bot, don't be upset when it crashes. Fix your mistakes and fire it back up:) _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 2:38 pm Post subject: |
|
|
| Quote: | | Because i don't want to make any mistake again. | Mistakes are how we learn. It's just a bot, don't be upset when it crashes. Fix your mistakes and fire it back up:)[/quote]
NO SPIKE It won't work on ALL channels me and him already done testing.
It only working on one channel only. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Mar 24, 2017 2:42 pm Post subject: |
|
|
And that is exactly what I would hope fixing that coding error might fix.
Are you not going to try the patch? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 2:45 pm Post subject: |
|
|
| SpiKe^^ wrote: | And that is exactly what I would hope fixing that coding error might fix.
Are you not going to try the patch? |
I am going to try it now, Let me open TCL file and edit. Lets see what happens and meanwhile you try to fix this bug |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Fri Mar 24, 2017 5:40 pm Post subject: |
|
|
| tested it that did the trick thnx SpiKe^^ |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Fri Mar 24, 2017 6:06 pm Post subject: |
|
|
| simo wrote: | | tested it that did the trick thnx SpiKe^^ |
Is it works? |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Mar 25, 2017 3:53 am Post subject: |
|
|
This works on all channels where the checkisauth flag is active, so in order to fix this issue activate it on all the channels you need:
| Code: |
.chanset * +checkisauth
|
I guess should do the trick. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Mar 25, 2017 5:09 am Post subject: |
|
|
tnx caesar as well
the amount of time and work is always apreciated and valued
oh and i saw u sugested few changes caesar can u perhaps pastebin the final code since its kinda confusing where to change exactly
i tried to aply the changes but got confused with the valid channel check where to insert that exactly |
|
| Back to top |
|
 |
|