This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Auto Voice To Those Who Are Register NICK.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

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
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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: 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 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
    }
  }
} 
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

I Suggest you to write for all channels.
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

I am not saying about myself. NEW Users are not getting Voice in other channels. You need to Edit it again for all channels.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

I thought someone told you to not use return in this foreach chan loop:)

Code: Select all

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: Select all

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
.
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

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
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

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...
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.
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
.
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

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.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

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
.
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

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
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

tested it that did the trick thnx SpiKe^^
User avatar
Fahad
Op
Posts: 129
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

simo wrote:tested it that did the trick thnx SpiKe^^
Is it works?
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

yw simo
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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: Select all

.chanset * +checkisauth
I guess should do the trick.
Once the game is over, the king and the pawn go back in the same box.
s
simo
Revered One
Posts: 1107
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
Post Reply