egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Auto Voice To Those Who Are Register NICK.
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 6:30 am    Post subject: Reply with quote

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
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Fri Mar 24, 2017 9:08 am    Post subject: Reply with quote

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
View user's profile Send private message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 9:33 am    Post subject: Reply with quote

I Suggest you to write for all channels.
Back to top
View user's profile Send private message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 502
Location: Tennessee, USA

PostPosted: Fri Mar 24, 2017 2:16 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 2:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 502
Location: Tennessee, USA

PostPosted: Fri Mar 24, 2017 2:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 502
Location: Tennessee, USA

PostPosted: Fri Mar 24, 2017 2:42 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 2:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Fri Mar 24, 2017 5:40 pm    Post subject: Reply with quote

tested it that did the trick thnx SpiKe^^
Back to top
View user's profile Send private message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Fri Mar 24, 2017 6:06 pm    Post subject: Reply with quote

simo wrote:
tested it that did the trick thnx SpiKe^^


Is it works?
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 502
Location: Tennessee, USA

PostPosted: Fri Mar 24, 2017 7:59 pm    Post subject: Reply with quote

yw simo
_________________
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
Back to top
View user's profile Send private message Visit poster's website
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Sat Mar 25, 2017 3:53 am    Post subject: Reply with quote

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.
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
simo
Master


Joined: 22 Mar 2015
Posts: 204

PostPosted: Sat Mar 25, 2017 5:09 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 4 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber