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.

eggrop with qauth user management

Old posts that have not been replied to for several years.
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

i think i made a small misstake with qbot script :oops:

i used a wrong script and so i never had qbot :roll:

with qbot i've no only the problem that he doesn't auth me with my qauth :(


Error Message in log-file:

[17:24] Tcl error [::qbot::unknowncommand]: wrong # args: should be "regsub ?switches? exp string subSpec var
Name"
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

You'll not belive it - IT WORKS!!!!!!!!!!!!!!!!

You are great :)
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

Tosser^^ wrote:I believe Metriod @ #development is making a Q9 project. Ask metriod maybe he could help.
i thought quakenet devolpment team was working called "Dev-com"
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

i meant making a copy of the Q9...
r0t3n @ #r0t3n @ Quakenet
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

i've one additional problem and my tcl knowledge is not the best :roll:

If a channel is set to number 3 (private) in chantype, every user should be kicked/banned which is not in list for this channel.

I could only be some if-statement where he checks chantype and if type is number 3, he should op/voice/kickban and nothing else (ban on *@host and not qauth.usr.quakenet.org)

i hope you could help me again :oops:

EDIT: here what my idea is:

in the part "initjoin" a if-statement which checks for chantype - if this type is 3, then he doesn't continue this part with "dojoiningcommands" - he should go to a new part called eg. "dojoiningprivatcommands" and there he has only the option Op/Voice/Kickban (so if a user has no flag in a chan, he'll be banned automatically).

Would be great if the ban could be on *@host and not to *@$qauth.usr.quakenet.org because not everyone uses +x


EDIT 2: here are my tests:

the part in "initjoin":

Code: Select all


 variable chantypes;


  if   {[channel get $chan chantype] == "3"}
  { doprivatcommands $nick $auth $chan; }
  else
the "new" part:

Code: Select all

proc qbot::doprivatcommands {nick auth chan host} {
  if {[getaccess $auth b $chan]} {
    putquick "MODE $chan +b *!*@$host"
    putquick "KICK $chan $nick :You are BANNED from this channel."
  } elseif {[getaccess $auth o $chan] && [getaccess $auth a $chan]} {
    putquick "MODE $chan +o $nick"
  } elseif {[getaccess $auth v $chan] && [getaccess $auth a $chan]} {
    putquick "MODE $chan +v $nick"
  }^M elseif {
    putquick "MODE $chan +b *!*@$host"
    putquick "KICK $chan $nick :You are BANNED from this channel."
    }
}
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Heh, Well Tosser^^, My script of Q9 is about done but it's not public nor will it be in the near future.

Code: Select all

proc qbot::doprivatcommands {nick auth chan host} {
  if {[getaccess $auth o $chan] && [getaccess $auth a $chan]} {
    putquick "MODE $chan +o $nick"
  } elseif {[getaccess $auth v $chan] && [getaccess $auth a $chan]} {
    putquick "MODE $chan +v $nick"
  } else {
    putquick "MODE $chan +b *!*$host"
    putquick "KICK $chan $nick :You are BANNED from this channel."
    }
} 
This code should work fine.
But don't forget, If you call an ELSEIF you need to supply with a statement which is true or false.
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

Many thanks Metroid - do you have also an idea what could be wrong in the "initjoin" part?

i get only the error:
Tcl error [::qbot::initjoin]: wrong # args: no script following "{[channel get $chan chantype] == "3"
}" argument
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

If you post a full version of the initjoin proc i can help you
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

this is my current try:

Code: Select all

proc qbot::initjoin {nick host hand chan} {
  variable users;
  variable jchans;
  variable chantyp;
  set chan [lindex [clean $arg(0)] 0];

  set chantyp [getchantyp $chan ];
  if {$chantyp == 3 }
  { doprivatcommands $nick $auth $chan; }


  if {![isbotnick $nick] && [botisop $chan]} {
    set welcome [channel get $chan "welcome"];
    if {$welcome != ""} {
      putquick [format {NOTICE %s :[%s] %s} $nick $chan [join $welcome " "]]
    }
    set auth [auth::getname $nick];
    if {$auth == 0} {
      set jchans($nick) $chan;
      utimer 30 [list catch "unset [namespace current]::jchans($nick)"];
      putquick "WHO $nick n%hnuat,69";
    } else {
      dojoincommands $nick $auth $chan;
    }
  }
}
and current error is:

Tcl error [::qbot::initjoin]: wrong # args: no script following "{$chantyp == 3 }" argument


i tried to put ; somewhere or to use additional {} but not realy working :(
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

syntax

Code: Select all

if {..} {
and not

Code: Select all

if {..}
 {
i
iamroot
Voice
Posts: 20
Joined: Sat Jul 09, 2005 5:47 am

Post by iamroot »

i corrected this misstake (i thought it's not important that it's in the same line) but the script itself is still not working with this new part for "doprivatecommands".

i don't know how to get this number from chantype to check it with an if-statement :(
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

if {([channel get $chan "chantype"] == 3)} {
blah
}
That checks if chantype = 3
If its a setudef str string
r0t3n @ #r0t3n @ Quakenet
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Fantastic and very useless.
Stop trying to help people if you have NO idea what your doing tosser.

Code: Select all

proc qbot::initjoin {nick host hand chan} {
  variable users;
  variable jchans;
  if {![isbotnick $nick] && [botisop $chan]} {
   if {[channel get $chan chantype] == 3 } { 
    doprivatcommands $nick $auth $chan
    return 0
   }
    set welcome [channel get $chan "welcome"];
    if {$welcome != ""} {
      putquick [format {NOTICE %s :[%s] %s} $nick $chan [join $welcome " "]]
    }
    set auth [auth::getname $nick];
    if {$auth == 0} {
      set jchans($nick) $chan;
      utimer 30 [list catch "unset [namespace current]::jchans($nick)"];
      putquick "WHO $nick n%hnuat,69";
    } else {
      dojoincommands $nick $auth $chan;
    }
  }
} 
Last edited by metroid on Wed Jul 13, 2005 1:25 am, edited 1 time in total.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

proc qbot::initjoin {nick host hand chan} { 

Code: Select all

if {[channel get $channel chantype] == 3 } { 
Note $chan not $channel. Oh no, Metriod made a mistake...

Should be

Code: Select all

proc qbot::initjoin {nick host hand chan} { 
  variable users; 
  variable jchans; 
  if {![isbotnick $nick] && [botisop $chan]} { 
   if {[channel get $chan chantype] == 3 } { 
    doprivatcommands $nick $auth $chan 
    return 0 
   } 
    set welcome [channel get $chan "welcome"]; 
    if {$welcome != ""} { 
      putquick [format {NOTICE %s :[%s] %s} $nick $chan [join $welcome " "]] 
    } 
    set auth [auth::getname $nick]; 
    if {$auth == 0} { 
      set jchans($nick) $chan; 
      utimer 30 [list catch "unset [namespace current]::jchans($nick)"]; 
      putquick "WHO $nick n%hnuat,69"; 
    } else { 
      dojoincommands $nick $auth $chan; 
    } 
  } 
} 
r0t3n @ #r0t3n @ Quakenet
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Tosser^^ wrote:Oh no, Metriod made a mistake...
We all make mistakes Tosser its just that you make them on every single post that you make.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked