<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10003" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-07-18T08:25:10-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10003</id>

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-18T08:25:10-04:00</updated>

		<published>2005-07-18T08:25:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52775#p52775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52775#p52775"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52775#p52775"><![CDATA[
That who calls a proc called qbot::getinfo.<br><br>Put your doprivate stuff there but remember to modify the proc so it doesn't stop on unauthed users.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Mon Jul 18, 2005 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamroot]]></name></author>
		<updated>2005-07-18T07:12:35-04:00</updated>

		<published>2005-07-18T07:12:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52772#p52772</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52772#p52772"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52772#p52772"><![CDATA[
my fix was solving the problem but now the bot kicks several users which are correct authenticated - i think there is not enough time to get qauth and put it in the var and so he thinks there is no qauth and kicks the user.<br><br>the "wait" command is not supported in my tcl - could someone help me with an alternative solution? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6460">iamroot</a> — Mon Jul 18, 2005 7:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamroot]]></name></author>
		<updated>2005-07-17T17:19:22-04:00</updated>

		<published>2005-07-17T17:19:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52726#p52726</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52726#p52726"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52726#p52726"><![CDATA[
i saw now a problem with the script - it works perfect for users with qauth but if someone joins channel without qauth, the bot doesn't kick?!?<br><br>i'm not realy able to see why this is not working - i though he checks all users on join  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>quakenet is so silly - you could set a chan to +r (registered users with qauths only) but if you invite someone manually he's able to join a +r channel also without qauth <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>EDIT: found solution <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>proc qbot::initjoin {nick host hand chan} {  variable users;  variable jchans;  if {![isbotnick $nick] &amp;&amp; [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";          if {([channel get $chan "chantype"] == 3)} {            set auth [auth::getname $nick];            doprivatcommands $nick $auth $chan;  }    } else {          if {([channel get $chan "chantype"] == 3)} {            set auth [auth::getname $nick];            doprivatcommands $nick $auth $chan;            } else {      dojoincommands $nick $auth $chan;      }     }    }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6460">iamroot</a> — Sun Jul 17, 2005 5:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-13T16:54:16-04:00</updated>

		<published>2005-07-13T16:54:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52428#p52428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52428#p52428"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52428#p52428"><![CDATA[
The channel is still being used, just not alot from what i know<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jul 13, 2005 4:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamroot]]></name></author>
		<updated>2005-07-13T16:49:46-04:00</updated>

		<published>2005-07-13T16:49:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52427#p52427</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52427#p52427"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52427#p52427"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>Well if it works and you think ppl can use it, submit it too the tcl archive</div></blockquote>Seeing as it's not his script but just a minor modification i don't think that's a god idea.</div></blockquote>This was my though - it's not my script and not my modification (only idea for modification).<br><br>I think the post here in the board should be ok - if anyone looks for the same funktion, he could see the modification here and apply it to his own script.<br><br>The website from Original Author is no longer available and the IRC Chan is no longer used so it's not realy easy to contact Author.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6460">iamroot</a> — Wed Jul 13, 2005 4:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-13T16:26:12-04:00</updated>

		<published>2005-07-13T16:26:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52426#p52426</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52426#p52426"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52426#p52426"><![CDATA[
<blockquote class="uncited"><div>Well if it works and you think ppl can use it, submit it too the tcl archive</div></blockquote>Seeing as it's not his script but just a minor modification i don't think that's a god idea.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jul 13, 2005 4:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamroot]]></name></author>
		<updated>2005-07-13T14:38:54-04:00</updated>

		<published>2005-07-13T14:38:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52417#p52417</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52417#p52417"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52417#p52417"><![CDATA[
it's currently a little bit in "quick &amp; dirty" style so i'll put it here - maybe someone will find the time to check (eg. the kickban is not working - shouldn't be a big problem).<br><div class="codebox"><p>Code: </p><pre><code>### Q TCL 1.0.045 (C) 2003-2005 perpleXa &amp; Zyberdog### Q/Q9 (C) 1999-2005 Mag, MadHacker, splidge##### INSTALLATION## 1. Copy this script and it's files to your scripts directory#### 2. Edit your eggdrop config file and add the following line to it##    source scripts/qbot.tcl#### 3. Edit the dbase/chanlevs file and replace perpleXa in##    "authname:perpleXa level:1000" with your AUTHNICK#### 4. Rehash your bot, the script should work.##### PROBLEMS## Contact us on irc.quakenet.org / #resistless## or visit http://perplexa.net / http://www.zyberdog.com##### INFO## This script is like Q (QuakeNet)## Get more info at http://quakenet.org/faq/faq.php?c=1##### IMPORTANT## In concern of your own safety, do not name the eggdrop like something## that can be mistaken for Q if you connect it to QuakeNet.## It will almost guarenteed get you glined.##### COMMANDS## CHANLEV          Shows or modifies user access on a channel.## ADDCHAN          Add a channel to the bot.## DELCHAN          Removes a channel from the bot.## INVITE           Invites you to a channel.## OP               Ops you on channel(s).## VOICE            Voices you on channel(s).## REHASH           Rehash the bot (like a regular eggdrop rehash).## CHANGELEV        Change/view the global auth level of a user.## HELP             Returns help for a specific command.## SHOWCOMMANDS     Shows all commands that are available to you.## WELCOME          Shows or changes the welcome message on a channel.## CHANTYPE         Change/view a channel type.##### DO NOT CHANGE THE FOLLOWING VALUES IF NOT NECESSARY (usually not)### Changing these might cause the script to stop workingnamespace eval qbot {  # // global variables  variable version 1.0.045;  variable helpdb "help/";  variable chandb "dbase/chanlevs";  variable server "putserv";  # // channel specific strings  setudef str welcome;  setudef str addedby;  setudef str founder;  setudef int chantype;  variable chantypes;  array set chantypes {    "1" "clan"    "2" "league"    "3" "private"    "4" "special"    "5" "gamesite"  };  # // binds  bind msg  -|- chanlev          [namespace current]::chanlevmsg;  bind msg  -|- addchan          [namespace current]::addchanmsg;  bind msg  -|- delchan          [namespace current]::delchanmsg;  bind msg  -|- invite           [namespace current]::invitemsg;  bind msg  -|- op               [namespace current]::opmsg;  bind msg  -|- voice            [namespace current]::voicemsg;  bind msg  -|- welcome          [namespace current]::welcomemsg;  bind msg  -|- help             [namespace current]::helpmsg;  bind msg  -|- showcommands     [namespace current]::showcommandsmsg;  bind msg  -|- rehash           [namespace current]::rehashmsg;  bind msg  -|- changelev        [namespace current]::changelevmsg;  bind msg  -|- chantype         [namespace current]::chantypemsg;  bind join -|- *                [namespace current]::initjoin;  bind msgm -|- *                [namespace current]::unknowncommand;  bind raw  -|- 354              [namespace current]::getinfo;  bind evnt -|- save             [namespace current]::save;  # // initialize  variable cwd [string trimright [file dirname [info script]] /]  variable users;  array set users "";  variable jchans;  array set jchans "";  variable authlev;  array set authlev "";  namespace export unknowncommand initjoin chanlevmsg getinfo;}# // bound eventsproc qbot::chanlevmsg {nick host hand args} {  variable users;  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  if {$auth == 0} {    putserver "NOTICE $nick :chanlev is only available to authed users.";    return 0;  }  if {$chan == ""} {    putserver "NOTICE $nick :chanlev: Not enough parameters.";    return 0;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  set authlev [getauthlev $auth];  if {[getaccess $auth amnov $chan] || ($authlev &gt;= 950)} {    set user [lindex [clean $arg(0)] 1];    set flags [lindex [clean $arg(0)] 2];    if {$user == ""} {      if {($authlev &gt;= 950)} {        putserver "NOTICE $nick :Added by: [channel get $chan addedby]";        putserver "NOTICE $nick :Original founder: [channel get $chan founder]";      }      putserver "NOTICE $nick :Channel type: [getchantype $chan]";      putserver "NOTICE $nick :Known users on $chan:";      putserver "NOTICE $nick :[format {%-15s %s} "Username" "Flags"]";      spewallusers $chan $nick;      putserver "NOTICE $nick :End of list.";      putserver "NOTICE $nick :Total: [totalusers $chan]";      return 1;    } elseif {$flags == ""} {      set uauth [finduser $user];      if {$uauth == 0} {        putserver "NOTICE $nick :Can't find that nickname."        return 0;      }      if {[getaccess $uauth abmnov $chan]} {        putserver "NOTICE $nick :$user modes on channel $chan: +[getflags $uauth $chan]";      } else {        putserver "NOTICE $nick :User is not known on that channel.";      }    } else {      set invalidflags "";      foreach flag [split $flags ""] {        if {[regexp -- {^[\+\-]$} $flag]} {          continue;        }        if {![string match *[clean $flag]* "abmnov"]} {          lappend invalidflags $flag;        }      }      set ilength [llength $invalidflags];      if {$ilength} {        putserver "NOTICE $nick :chanlev: Invalid flag[expr {($ilength == 1) ? "" : "s" }] specified: [join [lsort -unique $invalidflags] ""]";        return 0;      }      set uauth [finduser $user];      if {$uauth == 0} {        putserver "NOTICE $nick :Can't find that nickname."        return 0;      }      if {[getaccess $auth mn $chan] || ($authlev &gt;= 950)} {        if {[regexp -nocase -- {[mn]} $flags naflag] &amp;&amp; ![getaccess $auth n $chan] &amp;&amp; ($authlev &lt; 950)} {          if {[string equal -nocase $naflag "m"]} {            putserver "NOTICE $nick :You have to be owner to change a master's flags!"            return 0;          } else {            putserver "NOTICE $nick :You have to be owner to change an owners flags!"            return 0;          }        }        setaccess $uauth $chan $flags;        putserver "NOTICE $nick :Done."      } else {        putserver "NOTICE $nick :You have to be master to change someone's flags!"      }    }  } else {    putserver "NOTICE $nick :You do not have sufficient access on $chan to use chanlev.";  }}proc qbot::addchanmsg {nick host hand args} {  variable users;  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  if {($auth == 0) || ([getauthlev $auth] &lt; 950)} {    putserver "NOTICE $nick :You do not have sufficient privileges to use addchan.";    return 0;  }  set chan [lindex [clean $arg(0)] 0];  set user [lindex [clean $arg(0)] 1];  if {[validchan $chan]} {      putserver "NOTICE $nick :addchan: $chan is already added.";      return 0;  }  if {$chan == ""} {      putserver "NOTICE $nick :addchan: Not enough parameters.";      return 0;  }  if {$user == ""} {      putserver "NOTICE $nick :addchan: Not enough parameters.";      return 0;  }  set uauth [finduser $user];  if {$uauth == 0} {    putserver "NOTICE $nick :Unknown user $user.";    return 0;  }  channel add $chan;  channel set $chan founder $uauth;  channel set $chan addedby $auth;  channel set $chan chantype 0;  set users($chan,$uauth) ano;  putserver "NOTICE $nick :Done."}proc qbot::delchanmsg {nick host hand args} {  variable users;  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  if {($auth == 0) || ([getauthlev $auth] &lt; 950)} {    putserver "NOTICE $nick :You do not have sufficient privileges to use delchan.";    return 0;  }  if {$chan == ""} {    putserver "NOTICE $nick :delchan: Not enough parameters.";    return 0;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  foreach item [array names users] {    if {[string match -nocase [clean $chan],* $item]} {      unset users($item);    }  }  channel remove $chan;  putserver "NOTICE $nick :Done.";}proc qbot::invitemsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  if {$auth == "0"} {    putserver "NOTICE $nick :invite is only available to authed users.";    return 0;  }  if {$chan == ""} {    putserver "NOTICE $nick :invite: Not enough parameters.";    return 0;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  if {[getaccess $auth mno $chan] || ($authlev &gt;= 950)} {    putserver "INVITE $nick $chan";    putserver "NOTICE $nick :Done.";  } else {    putserver "NOTICE $nick :You do not have sufficient access on $chan to use invite.";  }}proc qbot::opmsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  if {$auth == 0} {    putserver "NOTICE $nick :op is only available to authed users.";    return 0;  }  set authlev [getauthlev $auth];  if {$chan == ""} {    foreach chan [channels] {      set access [getaccess $auth mno $chan];      if {[onchan $nick $chan] &amp;&amp; ![isop $nick $chan] &amp;&amp; ($access || ($authlev &gt;= 950)) &amp;&amp; [botisop $chan]} {        putserver "MODE $chan +o $nick";      }    }    putserver "NOTICE $nick :Done.";    retutn 1;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  if {[getaccess $auth mno $chan] || ($authlev &gt;= 950)} {    putserver "MODE $chan +o $nick";    putserver "NOTICE $nick :Done.";  } else {    putserver "NOTICE $nick :You do not have sufficient access on $chan to use op.";  }}proc qbot::voicemsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  if {$auth == 0} {    putserver "NOTICE $nick :voice is only available to authed users.";    return 0;  }  set authlev [getauthlev $auth];  if {$chan == ""} {    foreach chan [channels] {      set access [getaccess $auth mnv $chan];      if {[onchan $nick $chan] &amp;&amp; ![isvoice $nick $chan] &amp;&amp; ($access || ($authlev &gt;= 950)) &amp;&amp; [botisop $chan]} {        putserver "MODE $chan +v $nick";      }    }    putserver "NOTICE $nick :Done.";    retutn 1;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  if {[getaccess $auth mnv $chan] || ($authlev &gt;= 950)} {    putserver "MODE $chan +v $nick";    putserver "NOTICE $nick :Done.";  } else {    putserver "NOTICE $nick :You do not have sufficient access on $chan to use voice.";    return 0;  }  return 1;}proc qbot::welcomemsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set chan [lindex [clean $arg(0)] 0];  set msg [join [lrange [clean $arg(0)] 1 end] " "];  if {$auth == 0} {    putserver "NOTICE $nick :welcome is only available to authed users.";    return 0;  }  set authlev [getauthlev $auth];  if {$chan == ""} {    putserver "NOTICE $nick :welcome: Not enough parameters.";    return 0;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  if {[getaccess $auth mn $chan] || ($authlev &gt;= 950)} {    if {$msg == ""} {      set welcome [channel get $chan welcome];      if {$welcome == ""} {        putserver "NOTICE $nick :No welcome message is set on $chan";        return 0;      }      putserver "NOTICE $nick :Current Welcome message is:";      putserver "NOTICE $nick :[join $welcome " "]";      return 1;    }    channel set $chan welcome $msg;    putserver "NOTICE $nick :Done.";  } else {    putserver "NOTICE $nick :You do not have sufficient access on $chan to use welcome.";    return 0;  }  return 1;}proc qbot::helpmsg {nick host hand args} {  set arg(1) [lindex $args 0];  set cmd [lindex [clean $arg(1)] 0];  set auth [auth::getname $nick];  if {$cmd == ""} {    if {![ishelpfile global]} {      putserver "NOTICE $nick :Sorry, no help available.";    } else {      putserver "NOTICE $nick :The following commands are available to you:";      spewhelp $nick global [getauthlev $auth];      putserver "NOTICE $nick :End of list.";    }  } else {    if {![iscommand $cmd]} {      putserver "NOTICE $nick :$cmd: Unknown command.";    } elseif {![ishelpfile $cmd]} {      putserver "NOTICE $nick :Sorry, no help available for [string toupper $cmd].";    } else {      spewhelp $nick $cmd [getauthlev $auth];    }  }  return 1;}proc qbot::showcommandsmsg {nick host handle args} {  set arg(1) [lindex $args 0];  set cmd [lindex [clean $arg(1)] 0];  set auth [auth::getname $nick];  if {![ishelpfile global]} {    putserver "NOTICE $nick :Sorry, no help available.";    return;  }  putserver "NOTICE $nick :The following commands are available to you:";  spewhelp $nick global [getauthlev $auth] $cmd;  putserver "NOTICE $nick :End of list.";  return 1;}proc qbot::rehashmsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  if {($auth == 0) || ([getauthlev $auth] &lt; 998)} {    putserver "NOTICE $nick :You do not have sufficient privileges to use rehash.";    return 0;  }  set ccs [clock clicks];  rehash;  set cce [clock clicks];  putserver "NOTICE $nick :Done. ([format "%.2f" [expr ($cce - $ccs) / 1000.0]]ms)";  return 1;}proc qbot::changelevmsg {nick host hand args} {  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set lev [getauthlev $auth];  set user [lindex [clean $arg(0)] 0];  set newlev [lindex [clean $arg(0)] 1];  if {($auth == 0) || ($lev &lt; 100)} {    putserver "NOTICE $nick :You do not have sufficient privileges to use changelev.";    return 0;  }  if {$user == ""} {    putserver "NOTICE $nick :changelev: Not enough parameters.";    return 0;  }  set uauth [finduser $user];  if {$uauth == 0} {    putserver "NOTICE $nick :Can't find that nickname."    return 0;  }  set ulev [getauthlev $uauth];  if {$newlev == ""} {    putserver "NOTICE $nick :Current level global auth level of $user is: $ulev"    return 1;  } elseif {[regexp {[^0-9]} $newlev]} {    putserver "NOTICE $nick :Invalid level."    return 0;  } elseif {$lev &lt;= $ulev} {    putserver "NOTICE $nick :You can't change someone with a higher or equal level to your own!";    return 0;  } elseif {$lev &lt;= $newlev} {    putserver "NOTICE $nick :You can't give someone a higher or equal level to your own!";    return 0;  }  setauthlev $uauth $newlev;  putserver "NOTICE $nick :Done.";  return 1;}proc qbot::chantypemsg {nick host hand args} {  variable chantypes;  set arg(0) [lindex $args 0];  set auth [auth::getname $nick];  set lev [getauthlev $auth];  set chan [lindex [clean $arg(0)] 0];  set chantype [lindex [clean $arg(0)] 1];  if {($auth == 0) || ($lev &lt; 900)} {    putserver "NOTICE $nick :You do not have sufficient privileges to use chantype.";    return 0;  }  if {$chan == ""} {    putserver "NOTICE $nick :chantype: Not enough parameters.";    return 0;  }  if {![validchan $chan]} {    putserver "NOTICE $nick :Channel $chan is unknown.";    return 0;  }  if {$chantype == ""} {    if {[channel get $chan chantype] != ""} {      putserver "NOTICE $nick :Current type is: [channel get $chan chantype] \[[getchantype $chan]\]";    } else {      putserver "NOTICE $nick :Current type not set.";    }  } else {    set nr -1;    if {[string index $chantype 0] == "#"} {      set nr [string range $chantype 1 end];      if {![string is digit $nr] || [string equal $nr ""]} {        putserver "NOTICE $nick :Couldn't find a digit after #";        return 0;      }    }    if {$nr == 0} {      channel set $chan chantype 0;      putserver "NOTICE $nick :Channeltype cleared for channel \[$chan\]";      return 1;    }    foreach item [array names chantypes] {      if {$nr &gt; 0} {        if {[info exists chantypes($nr)]} {          channel set $chan chantype $nr;          putserver "NOTICE $nick :Channeltype set to $nr \[$chantypes($nr)\]";          return 1;        }      } else {        if {[string equal -nocase $chantypes($item) $chantype]} {          channel set $chan chantype $item;          putserver "NOTICE $nick :Channeltype set to $item \[$chantypes($item)\]";          return 1;        }      }    }    putserver "NOTICE $nick :Channeltype not found.";  }  return 1;}proc qbot::initjoin {nick host hand chan} {  variable users;  variable jchans;  if {![isbotnick $nick] &amp;&amp; [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 {          if {([channel get $chan "chantype"] == 3)} {            set auth [auth::getname $nick];            doprivatcommands $nick $auth $chan;            } else {      dojoincommands $nick $auth $chan;      }    }  }}proc qbot::getinfo {server rawid content} {  variable jchans;  set id [lindex [clean $content] 1]  set nick [lindex [clean $content] 4]  set auth [lindex [clean $content] 5]  if {($id != 69) || ($auth == 0) || ![info exists jchans($nick)]} {    return 0  }  set chan $jchans($nick);  unset jchans($nick);  auth::savename $server $rawid "[lindex [clean $content] 0] 666 [string trim [join [lrange [split $content " "] 2 end] " "] " "]";      if {([channel get $chan "chantype"] == 3)} {#            set auth [auth::getname $nick];            doprivatcommands $nick $auth $chan;      } else {          dojoincommands $nick $auth $chan;      }}proc qbot::unknowncommand {nick host hand args} {  set arg(1) [lindex $args 0];  set cmd [lindex [split [string trim $arg(1) "\x20"] "\x20"] 0];  set text [clean $args];  set auth [auth::getname $nick];  if {![iscommand $cmd]} {    putserver "NOTICE $nick :$cmd: Unknown command.";  }  return;}# // misceleanousproc qbot::spewallusers {chan nick} {  variable users;  foreach item [array names users] {    if {[string match -nocase [clean $chan],* $item]} {      set user [getrealuser $item];      putserver "NOTICE $nick :[format { %-15s +%s} $user $users($item)]"    }  }}proc qbot::getchantype {chan} {  variable chantypes;  set chantype [channel get $chan chantype];  if {[info exists chantypes($chantype)]} {    return $chantypes($chantype);  }  return "(unspecified)";}proc qbot::getflags {auth chan} {  variable users;  foreach item [array names users] {    if {[string equal -nocase $chan,$auth $item]} {      return $users($item);    }  }  return;}proc qbot::getrealuser {item} {  return [lindex [split $item ","] end];}proc qbot::finduser {user} {  set auth [expr {([string index $user 0] == "#") ? [string range $user 1 end] : [auth::getname $user]}];  return [expr {([string length $auth] &lt;= 15) ? $auth : 0}];}proc qbot::totalusers {chan} {  variable users;  set total 0; set owner 0; set master 0;  set op 0; set voice 0; set ban 0;  foreach item [array names users] {    if {[string match -nocase [clean $chan],* $item]} {      set flag $users($item);      incr total      if {[string match "*b*" $flag]} {incr ban}      if {[string match "*n*" $flag]} {incr owner}      if {[string match "*m*" $flag] &amp;&amp; ![string match "*n*" $flag]} {incr master}      if {[string match "*o*" $flag] &amp;&amp; ![regexp -- "\[mn\]" $flag]} {incr op}      if {[string match "*v*" $flag] &amp;&amp; ![regexp -- "\[mno\]" $flag]} {incr voice}    }  }  return "$total (owner: $owner, master: $master, op: $op, voice: $voice, ban: $ban)."}proc qbot::setauthlev {auth lev} {  variable authlev;  set x $auth;  foreach item [array names authlev] {    if {[string equal -nocase $auth $item]} {      set x $item;      break;    }  }  if {$lev &lt;= 1} {    catch {unset authlev($x);}    return 1;  }  set authlev($x) $lev;  return $lev;}proc qbot::setaccess {auth chan flags} {  variable users;  set x $chan,$auth;  set oflags "";  foreach item [array names users] {    if {[string equal -nocase $chan,$auth $item]} {      set x $item;      set oflags $users($x);      break;    }  }  set nflags [string trimleft [lindex [msplit $flags] 0] "-"];  set pflags [string trimleft [lindex [msplit $flags] 1] "+"];  set tmp ""; foreach flag [split $nflags ""] {lappend tmp "$flag \"\"";}; set tmp [join $tmp " "];  set newflags [string trimleft [lindex [msplit "[string map $tmp $oflags]$pflags"] 1] "+"];  set newflags [join [lsort -dictionary -unique [split $newflags ""]] ""];  if {$newflags == ""} {    unset users($x);  } else {    set users($x) $newflags;  }  return 1;}proc qbot::msplit {str} {  for {set p {}; set n {}; set t p; set x 0; set y [expr [string length $str]-1]} {$x &lt;= $y} {incr x 1} {    set i [string index $str $x];    if {$i == "-"} {      set t n;      continue;    } elseif {$i == "+"} {      set t p;      continue;    } elseif {[regexp -- {\s|\000} $i]} {      continue;    } else {      regsub -all -- {([\(\)\[\]\{\}\!\*\?\|\.\$\^\\])} $i {\\\1} j;    }    if {![regexp -- $j [subst $$t]]} {      append $t $i;    }  }  return [list -$n +$p];}proc qbot::getauthlev {auth} {  variable authlev;  if {$auth == 0} {    return 0;  }  foreach item [array names authlev] {    if {[string equal -nocase $auth $item]} {      return $authlev($item);    }  }  return 1;}proc qbot::dojoincommands {nick auth chan} {  if {[getaccess $auth b $chan]} {    putquick "MODE $chan +b *!*@$auth.users.quakenet.org"    putquick "KICK $chan $nick :You are BANNED from this channel."  } elseif {[getaccess $auth o $chan] &amp;&amp; [getaccess $auth a $chan]} {    putquick "MODE $chan +o $nick"  } elseif {[getaccess $auth v $chan] &amp;&amp; [getaccess $auth a $chan]} {    putquick "MODE $chan +v $nick"  }}proc qbot::doprivatcommands {nick auth chan} {#    variable bhost;  if {[getaccess $auth o $chan] &amp;&amp; [getaccess $auth a $chan]} {      putquick "MODE $chan +o $nick"    } elseif {[getaccess $auth v $chan] &amp;&amp; [getaccess $auth a $chan]} {            putquick "MODE $chan +v $nick"      } else {#        set bhost [*!*@[lindex [split [getchanhost $nick $chan] @] 1]];#        putquick "MODE $chan +b *!*$bhost"        putquick "KICK $chan $nick :You are not AUTHORIZED to access this Channel."      }  }proc qbot::iscommand {cmd} {  foreach bind [binds msg] {    regexp -- {^\S+\s\S+\s(\S+)\s\S+\s\S+$} $bind -&gt; result;    set result [join $result "\x20"];    if {[string equal -nocase $cmd $result]} {      return 1;    }  }  return 0;}proc qbot::getaccess {auth flags chan} {  variable users;  foreach item [array names users] {    if {[string equal -nocase $chan,$auth $item]} {      foreach flag [split $flags ""] {        if {[string match *$flag* $users($item)]} {          return 1;        }      }    }  }  return 0;}proc qbot::ishelpfile {file} {  variable helpdb;  variable cwd;  set file [string tolower $file.help];  if {[file exists $cwd/$helpdb$file]} {    return 1;  }  return 0;}proc qbot::spewhelp {nick file lvl args} {  variable helpdb;  variable cwd;  global botnick;  set file [string tolower $file.help];  set fd [open $cwd/$helpdb$file r+];  set pt [lindex [clean [lindex $args 0]] 0];  regsub -all -- {(&amp;)} $botnick {\\\1} mynick;  while {![eof $fd]} {    gets $fd line;    if {![regexp -- {\S} $line]} {      continue;    }    set nlvl [lindex [clean $line] 0];    set kwrd [lindex [clean $line] 1];    set output [string trim [join [lrange [split $line " "] 1 end] " "] " "];    if {([string match -nocase [clean $pt] $kwrd] || ($pt == "")) &amp;&amp; ($lvl &gt;= $nlvl)} {      regsub -all -- {:botnick:} $output $mynick output;      putserver "NOTICE $nick :$output";    }  }  close $fd;  return;}proc qbot::load {} {  variable chandb;  variable users;  variable authlev;  variable cwd;  if {![file isdirectory [file dirname $cwd/$chandb]]} {    file mkdir [file dirname $cwd/$directory]  }  if {![file exists $cwd/$chandb]} {return 0;}  if {[array exists users]} {array unset users;}  if {[array exists authlev]} {array unset authlev;}  set file [open $cwd/$chandb r+];  set count 0;  while {![eof $file]} {    gets $file line;    if {[regexp -nocase -- {^channel:(\S+)\sid:(\S+)\sflags:(\S+)$} $line -&gt; chan auth flags]} {      set users($chan,$auth) $flags;      incr count;    } elseif {[regexp -nocase -- {^authname:(\S+)\slevel:(\S+)$} $line -&gt; auth level]} {      set authlev($auth) $level;      incr count;    }  }  close $file;  return $count;}proc qbot::save {args} {  variable chandb;  variable users;  variable authlev;  variable cwd;  if {![file isdirectory [file dirname $cwd/$chandb]]} {    file mkdir [file dirname $cwd/$chandb]  }  set file [open $cwd/$chandb w+];  set count 0;  foreach chanlev [array names users] {    regexp {^(\S+),(\S+)$} $chanlev -&gt; chan user;    if {[validchan $chan]} {      puts $file "channel:$chan id:$user flags:$users($chanlev)";      incr count;    }  }  foreach user [array names authlev] {    puts $file "authname:$user level:$authlev($user)";    incr count;  }  close $file  return $count;}proc qbot::putserver {args} {  variable server;  set rawstr [lindex $args 0];  $server $rawstr;  return;}proc qbot::clean {i} {  return [regsub -all -- {([\(\)\[\]\{\}\$\"\\])} $i {\\\1}];}if {[info commands rputquick] != "rputquick"} {  rename putquick rputquick;  proc putquick {args} {    if {[llength $args]&lt;1} {      error "wrong $ args: should be \"putquick string ?options?\"";    }    set str [lindex $args 0];    set strlen [expr [string length $str]-1];    if {![string equal [string range $str [expr $strlen-1] $strlen] "\r\n"]} {      append str "\r\n";    }    putdccraw 0 [string length $str] $str;    return;  }}bind flud -|- * flood;proc flood {nick host hand type chan args} {  if {[matchattr $hand fmno|fmno $chan]} {    return 1;  }  return 0;}qbot::load;# // (C)putlog "Script loaded: The Q Bot by perpleXa &amp; Zyberdog"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6460">iamroot</a> — Wed Jul 13, 2005 2:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizzle]]></name></author>
		<updated>2005-07-13T14:23:32-04:00</updated>

		<published>2005-07-13T14:23:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52415#p52415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52415#p52415"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52415#p52415"><![CDATA[
Well if it works and you think ppl can use it, submit it too the tcl archive<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6156">Dizzle</a> — Wed Jul 13, 2005 2:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iamroot]]></name></author>
		<updated>2005-07-13T12:21:04-04:00</updated>

		<published>2005-07-13T12:21:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52410#p52410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52410#p52410"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52410#p52410"><![CDATA[
many thanks to all <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br><br>only the ban is not working - he kicks only but this should be enough for the moment.<br><br>Should i post here the complete script now? Maybe someone else is looking for the same.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6460">iamroot</a> — Wed Jul 13, 2005 12:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-13T01:26:32-04:00</updated>

		<published>2005-07-13T01:26:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52385#p52385</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52385#p52385"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52385#p52385"><![CDATA[
Yeah well i posted this when i was sleepy so don't blame me.<br>Tosser, this is seriously going too far, if you don't know how to script TCL other than simply copying things, you should really just ask your questions here, but no helping.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jul 13, 2005 1:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-12T18:03:15-04:00</updated>

		<published>2005-07-12T18:03:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52368#p52368</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52368#p52368"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52368#p52368"><![CDATA[
yep. Well atleast im the only one. Otherwise it will be script mayhem here.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Tue Jul 12, 2005 6:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-07-12T17:35:09-04:00</updated>

		<published>2005-07-12T17:35:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52366#p52366</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52366#p52366"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52366#p52366"><![CDATA[
<blockquote class="uncited"><div>Oh no, Metriod made a mistake...</div></blockquote>We all make mistakes Tosser its just that you make them on every single post that you make.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Tue Jul 12, 2005 5:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-12T17:12:52-04:00</updated>

		<published>2005-07-12T17:12:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52364#p52364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52364#p52364"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52364#p52364"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc qbot::initjoin {nick host hand chan} { </code></pre></div><div class="codebox"><p>Code: </p><pre><code>if {[channel get $channel chantype] == 3 } { </code></pre></div>Note $chan not $channel. Oh no, Metriod made a mistake...<br><br>Should be<br><div class="codebox"><p>Code: </p><pre><code>proc qbot::initjoin {nick host hand chan} {   variable users;   variable jchans;   if {![isbotnick $nick] &amp;&amp; [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;     }   } } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Tue Jul 12, 2005 5:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-13T01:25:09-04:00</updated>

		<published>2005-07-12T16:36:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52361#p52361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52361#p52361"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52361#p52361"><![CDATA[
Fantastic and very useless.<br>Stop trying to help people if you have NO idea what your doing tosser.<br><div class="codebox"><p>Code: </p><pre><code>proc qbot::initjoin {nick host hand chan} {  variable users;  variable jchans;  if {![isbotnick $nick] &amp;&amp; [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;    }  }} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue Jul 12, 2005 4:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-12T12:26:27-04:00</updated>

		<published>2005-07-12T12:26:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=52338#p52338</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=52338#p52338"/>
		<title type="html"><![CDATA[eggrop with qauth user management]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=52338#p52338"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {([channel get $chan "chantype"] == 3)} {blah}</code></pre></div>That checks if chantype = 3<br>If its a setudef str string<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Tue Jul 12, 2005 12:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
