<?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/13535" />

	<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>2007-05-28T15:32:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T15:32:18-04:00</updated>

		<published>2007-05-28T15:32:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73116#p73116</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73116#p73116"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73116#p73116"><![CDATA[
Hehe, discard all my other comments about not getting the botnet function to work. I've got it to work a little now, lol.<br><br>This script is buggy as hell. Its too bad its so buggy. After adding a " sign in advert_in it now actually sends the command to the bot in the botnet like:<br><br>(21:29:32) (h1dden) [21:29] [AdverT] Advertisment requested for nsrafk on #roflchuckz from fel1cia<br>(21:29:45) (h1dden) [21:29] Tcl error in script for 'timer47991':<br>(21:29:45) (h1dden) [21:29] can't read "random_advert": no such variable<br><br>Im not good at tcl or anything, so i guess i have to pass this script to the recycle bin, unless some of you leet coders out there will enhance this script.<br><br>I really hope there is one of you who want to. <br><br>Peace.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T15:04:00-04:00</updated>

		<published>2007-05-28T15:04:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73115#p73115</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73115#p73115"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73115#p73115"><![CDATA[
Okay now its weird. It suddenly started to work. Though, it still doesn't work when i want to set the advertise trough another bot in the botnet. errorinfo shows nothing... wierd script<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 3:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T14:20:48-04:00</updated>

		<published>2007-05-28T14:20:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73112#p73112</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73112#p73112"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73112#p73112"><![CDATA[
# Comment these two lines if you wish to enable the .tcl and .set commands.<br># If you select your owners wisely, you should be okay enabling these.<br>#unbind dcc n tcl *dcc:tcl<br>#unbind dcc n set *dcc:set<br><br>-- hmm thats how it looks in the conf.. why doesnt it work? lol<br><br>-- nvm, works now. is it .set errorInfo i need to use to see errors?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T14:20:00-04:00</updated>

		<published>2007-05-28T14:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73111#p73111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73111#p73111"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73111#p73111"><![CDATA[
(20:19:51) &lt;nsrafk&gt; .set<br>(20:19:51) (fel1cia) What? You need '.help'<br>(20:19:58) &lt;nsrafk&gt; .tcl set<br>(20:19:58) (fel1cia) What? You need '.help'<br><br>---<br><br>I guess they're disabled - lemme see how to enable it. wait 5 mins<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 2:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-28T14:13:28-04:00</updated>

		<published>2007-05-28T14:13:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73110#p73110</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73110#p73110"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73110#p73110"><![CDATA[
Doublechecked the values using ".set" or ".tcl set" from the dcc-chat partyline?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon May 28, 2007 2:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T13:58:13-04:00</updated>

		<published>2007-05-28T13:58:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73108#p73108</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73108#p73108"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73108#p73108"><![CDATA[
Heh, well the onjoin is set to 1, and onpart to 0. i dont get any errormessages myself <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> thats why i think its odd <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-28T13:10:12-04:00</updated>

		<published>2007-05-28T13:10:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73105#p73105</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73105#p73105"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73105#p73105"><![CDATA[
Then the only cause for ads not to be shown, yet no error-messages being reported, would be that "advert(onpart)" and/or "advert(onjoin)", or "adverts" have been set to 0.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon May 28, 2007 1:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T10:47:38-04:00</updated>

		<published>2007-05-28T10:47:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73102#p73102</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73102#p73102"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73102#p73102"><![CDATA[
Ow, sorry. well, ill paste you some info:<br>I've only tried to do some testing, so its only lame ads:<br><br>(16:46:38) -fel1cia-  0  : #nosser #nosser #nosser<br>(16:46:39) -fel1cia-  1  : #nosser #nosser #nosser<br>(16:46:41) -fel1cia-  2  : #nosser #nosser #nosser<br><br>the channels i've tested looks like this:<br><br>#nsrafk #wtfthiswontworkffs<br><br>so, no special chars at all. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-28T10:26:05-04:00</updated>

		<published>2007-05-28T10:26:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73101#p73101</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73101#p73101"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73101#p73101"><![CDATA[
Yes, but have you verified they're "in the system" by using the listing command?<br>Those bugs I mentioned in my previous post basically means that anyone who figures you're running this script could gain total control over your bot by using specially crafted nicknames, and might possibly succeed in hijacking your shell-account aswell if they're enough creative...<br><br>Also, you never answered to my last question 'bout channel names and wether they have any "special" characters..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon May 28, 2007 10:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T10:19:19-04:00</updated>

		<published>2007-05-28T10:19:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73100#p73100</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73100#p73100"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73100#p73100"><![CDATA[
Yea, i have adverts added ofcourse, hehe. Seriously, i have absolutely no clue on all that u wrote in your first post. Its nonsense to me, lol. If you have some spare time, i'd be very happy if u would fix the bugs. But only if u want to ofcourse. <br>Anyway, i still can't get it to work. Ive tried everything. Maybe its because of eggdrop 1.6.18.. Sucks :&lt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-28T09:56:28-04:00</updated>

		<published>2007-05-28T09:56:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73099#p73099</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73099#p73099"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73099#p73099"><![CDATA[
Forgot to mention, that all the issues mentioned in the previous post regarding nickname, also applies to channelnames..<br>So if you have any special characters in the name of any of the channels you intend to use the script in, this might also be a cause of problems.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon May 28, 2007 9:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-05-28T09:22:13-04:00</updated>

		<published>2007-05-28T09:22:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73098#p73098</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73098#p73098"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73098#p73098"><![CDATA[
This script has a serious flaw that could permit remote code execution. It uses utimers in a very unsafe manner, allowing anyone to inject code using their nickname. The flawed code I noticed was this (from do_advert_join):<div class="codebox"><p>Code: </p><pre><code> } else {utimer [get_adverttime] "advert_do $nick $chan"</code></pre></div>This same code also exists in do_advert_part, however, the author has made a crude attemt to prevent remote-code execution using multiple regsub's...<br>The proper way of doing it, would be something like this:<div class="codebox"><p>Code: </p><pre><code>} else {utimer [get_adverttime] [list advert_do $nick $chan]</code></pre></div>which does not require any extra filtering of possibly malicious nicks...<br><br>Also looking further, you'd find this line in advert_in (handling incoming requests from other bots), which purpose I really fail to understand, yet it makes me believe it's supposed to protect the script from above mentioned exploits aswell (which it will not):<div class="codebox"><p>Code: </p><pre><code>subst -nobackslashes -nocommands -novariables arg</code></pre></div>Also, this proc contains the same issue with utimer, allowing further remote code execution from any linked bot (regardless of userfile sharing, etc).<br><br>Also, there are numerous list-commands that use strings, which also is a bad idea.<br><br>Considdering the age, I'd guess this script has been abandoned by the author long ago.<br><br>Now, as why it does not work (apart from the above mentioned issues), have you checked that there actually is a list of ads loaded?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon May 28, 2007 9:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-28T08:30:37-04:00</updated>

		<published>2007-05-28T08:30:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73097#p73097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73097#p73097"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73097#p73097"><![CDATA[
Well, im using the script as i posted. Exact same settings as i posted. The problem is kinda simple. The bot wont advertise. Nomatter if i set the actualy bot to do the advertising, or another bot in the botnet. When i set the advertise messages it says its all ok, but no advertising is being sent to people when they join channels :\<br>I dont get any errors in partyline either.. Its weird<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8985">nsrafk</a> — Mon May 28, 2007 8:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-05-27T21:07:46-04:00</updated>

		<published>2007-05-27T21:07:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73080#p73080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73080#p73080"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73080#p73080"><![CDATA[
What exactly is the problem? Are there any errors? Post your script's configurations.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun May 27, 2007 9:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nsrafk]]></name></author>
		<updated>2007-05-27T20:44:20-04:00</updated>

		<published>2007-05-27T20:44:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=73075#p73075</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=73075#p73075"/>
		<title type="html"><![CDATA[Advert v1.05 by David Proper (Dr. Nibble [DrN])]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=73075#p73075"><![CDATA[
okay, i will do that.<div class="codebox"><p>Code: </p><pre><code>#         Script : Advert v1.05 by David Proper (Dr. Nibble [DrN])#                  Copyright 1999-2002 Radical Computer Systems#                             All Rights Reserved##       Testing#      Platforms : Linux 2.2.16   TCL v8.3#                  Eggdrop v1.6.2#                  Eggdrop v1.6.6#            And : SunOS 5.8      TCL v8.3#                  Eggdrop v1.5.4##    Description : Advert will allow you to define advertisment lines to#                  be sent to anyone leaving a channel the bot is on. #                  May also be used with a connected bot to send the ads#                  threw. Definable probability if it will advertise.##       History : 06/16/1999 - First Release#                 03/23/2001 - v1.01 #                             o Added in a nochannel list#                 11/19/2001 - v1.02           #                             o Added in a random "Starter Line"#                               Added in botnet ability#                                One bot sees the part and tells the other#                                bot to advertise. Best if used in bots on#                                different sitemasks.#                             o Added NOTICE or PRIVMSG message types#                             o Advertisments can be sent randomly or#                               in sequencial order.#                             o Wont advertise to itself. :)#                             o Probability of sending the advertisment#                 04/11/2002 - v1.03#                             o Optional advert on part and/or join.#                             o Added 1 more starterline#                             o Optional random time before sending advert#                               (Requested by Chad \ hockey@IRC)#                 06/21/2002 - v1.04#                             o Fixed $channel variable error in on-join#                               (Reported by illusi0n)#                 12/09/2002 - v1.05#                             o Fixed reverse variable error.#                               (Reported by: \L\ @DALnet)#                             o Fixed missing sendit proc#                               (Reported by: \L\ @DALnet)#                             o Fixed [die] nick vulnerability##      Donations : https://www.paypal.com/xclick/business=rainbows%40stx.rr.com# (If you don't have PayPal and want to donate, EMail me for an address.#  Will take money or hardware/computer donations)#  Significant (or even non-significant donations) can be published on a#  web site if you so choose.##   Future Plans : Make a suggestion#[\L\(asdf@cmb7-137.dial-up.arnes.si)] Btw, can you add function, that bot will advertise adverts in public channel, automaticaly every x mins all adverts.. ?#[\L\(asdf@cmb7-137.dial-up.arnes.si)] and "!searchadvert" will be also welcome#[\L\(asdf@cmb7-137.dial-up.arnes.si)] for example:#[\L\(asdf@cmb7-137.dial-up.arnes.si)] !searchadvert *old car*#[\L\(asdf@cmb7-137.dial-up.arnes.si)] will find all adverts that are like this:  I'm selling 3 years old car, white color, ....#(\L\@DN) can you also add - AUTO-EXPIRE-ADVERT ... so advertisement will expire after x days#(\L\@DN) can you do some kind of MAIN SWITCH ... so if I turn that !mainswitch off, then it will totaly disable script ...### Author Contact :     Email - DProper@chaotix.net#                   Homepage - http://www.chaotix.net/~dproper#                        IRC - Primary Nick: DrN#                     UseNet - alt.irc.bots.eggdrop# Support Channels: #RCS @UnderNet.Org#                   #RCS @DALnet#                   #RCS @EFnet#                   #RCS @GalaxyNet#                   #RCS @Choatix Addiction#            Other channels - Check contact page for current list##                Current contact information can be located at:#                 http://www.chaotix.net/rcs/contact.html## New TCL releases are sent to the following sites as soon as they're released:## FTP Site                   | Directory                     # ---------------------------+-------------------------------# ftp.chaotix.net            | /pub/RCS# ftp.eggheads.org           | Various# ftp.realmweb.org           | /drn## Radical Computer System's Main Support Site: http://rcs.chaotix.net# To subscribe to the RCS mailing list:#  http://www.chaotix.net/mailman/listinfo/rcs-list#  ##  Feel free to Email me any suggestions/bug reports/etc.# # You are free to use this TCL/script as long as:#  1) You don't remove or change author credit#  2) You don't release it in modified form. (Only the original)# # If you have a "too cool" modification, send it to me and it'll be# included in the official. (With your credit)## Commands Added:#  Where     F CMD                     F CMD        # ---------- - ---------               - ---------- #  Public:   o !listadvert             m !deladvert #            m !addadvert              m !adverts#            - !adverthelp#     MSG:   - adverthelp#     DCC:   - adverthelp#set cmdchar_ "!"# Datafile to store adverts inset advert(datafile) "adverts"# [0/1] Set this to 1 if you want the advert to be sent on joinset advert(onjoin) 0# [0/1] Set this to 1 if you want the advert to be sent on partset advert(onpart) 1# [0+] (Seconds) Set this above 0 if you want a delay on sending the advert.set advert(delay) 15# [0+] (Seconds) Set this to the minimum delay.set advert(delay_base) 10# Delay is calculated as:  delay_base + (random number from 0 to delay)# Channels not to send adverts to people when partingset advert(ignore) "#channel1 #channel2"# [NOTICE/PRIVMSG] Method of sending textset advert(type) "NOTICE"# [0/1] Set to 0 for random adverts, set to 1 for sequencialset advert(gettype) 1# Set this to the botnet nick of the bot to spam for you. Set to ""# if you want this bot to do the adverts.set advert(usebot) ""# Netcode. Change for each network this script is run on so you don't send# advert requests for UnderNet to DALnet or so.set advert(netcode) 927# This is the percentage chance they will get an advertisment.# Set to 100 to always send an advertisment.set advert(prob) 85# This is the starter line to send before the actually advert. Set to ""# if you don't want anything sent.set advert(starterline) { {Hi. How are you?} {Hi there.} {You looked bored in $chan.} {Hey There!}                        }set advert(ver) "1.05.01"set advert(tag) "\[\002AdverT\002\]"proc cmdchar { } {global cmdchar_return $cmdchar_}bind pub o [cmdchar]listadvert pub_advertlistproc pub_advertlist {nick uhost hand channel rest} {global random_advertadvert_loadputserv "NOTICE $nick :Listing Advertisments Database"set looper 0while {($looper &lt; [llength $random_advert])} {  putserv "NOTICE $nick :\026 $looper \026 : [lindex $random_advert $looper]"  incr looper 1                                             }putserv "NOTICE $nick :--EOF"}bind pub m [cmdchar]deladvert pub_advertdelproc pub_advertdel {nick uhost hand channel rest} {global random_advert set delwhat [lindex $rest 0]if {($delwhat == "")} {putserv "NOTICE $nick :Calling Syntax:    [cmdchar]deladvert #"                       return 1}if {($delwhat &lt; 0) || ($delwhat &gt; [llength $random_advert])} { putserv "NOTICE $nick :You specified an invalid reference." return 1                                                             } set advert_temp $random_advert unset random_advert set deleted [lindex $advert_temp $delwhat]set looper 0while {($looper &lt; [llength $advert_temp])} {  if {($looper != $delwhat)} {lappend random_advert [lindex $advert_temp $looper]}            incr looper 1                                             }putserv "NOTICE $nick :Deleted advert #$delwhat - $deleted"advert_write}bind pub m [cmdchar]addadvert pub_advertaddproc pub_advertadd {nick uhost hand channel rest} {global random_advert set addwhat [lrange $rest 0 end]if {($addwhat == "")} {putserv "NOTICE $nick :Calling Syntax: [cmdchar]addadvert \[advertisment line\]"                       return 1}lappend random_advert $addwhatputserv "NOTICE $nick :Added advert #[llength $random_advert] - $addwhat"advert_write}proc advert_load {} {   global random_advert advert adverts   if {[info exists random_advert]} {unset random_advert}   if {[catch {set fd [open $advert(datafile) r]}] != 0} {return 0}   set adverts [gets $fd]   while {![eof $fd]} {      set inp [gets $fd]      if {[eof $fd]} {break}      if {[string trim $inp " "] == ""} {continue}      lappend random_advert [lrange $inp 0 end]   }   close $fd   return 1}proc advert_write {} {   global advert random_advert adverts_changed advertsset fd [open $advert(datafile) w]puts $fd "$adverts"set looper 0while {($looper &lt; [llength $random_advert])} {            puts $fd "[lindex $random_advert $looper]"            incr looper 1                                             }   close $fd   set advertss_changed 0   return 1}bind join - ***** do_advert_joinproc do_advert_join {nick uhost hand chan} {global adverts random_advert advert botnick if {$advert(onjoin) == 0} {return 1} if {$adverts == 0} {return 1} if {[string tolower $nick] == [string tolower $botnick]} {return 0}   if {$advert(usebot) != ""} {putbot $advert(usebot) "ADVERT $advert(netcode) $nick $chan"                           } else {utimer [get_adverttime] "advert_do $nick $chan"                                  }}bind part - ***** do_advert_partproc do_advert_part {nick uhost hand channel {msg ""}} {global adverts random_advert advert botnicksubst -nobackslashes -nocommands -novariables nicksubst -nobackslashes -nocommands -novariables msgregsub -all {\[} $nick "\\\[" nickregsub -all {\]} $nick "\\\]" nickregsub -all {\[} $nick "\\\[" msgregsub -all {\]} $nick "\\\]" msg#regsub -all {\[} $nick "!BRAKET!" nick#if {[string match "*!BRAKET!*" "$nick"] &gt; 0 } {# putserv "privmsg #rcs :Found a \[ so [censored]'um"# return 0#} if {$advert(onpart) == 0} {return 1} if {$adverts == 0} {return 1} if {[string tolower $nick] == [string tolower $botnick]} {return 0}   if {$advert(usebot) != ""} {putbot $advert(usebot) "ADVERT $advert(netcode) $nick $channel"                           } else {utimer [get_adverttime] "advert_do $nick $channel"                                  }}bind bot - advert advert_inproc advert_in {bot cmd arg} {subst -nobackslashes -nocommands -novariables arg global advert network set c [lindex $arg 0] set nick [lindex $arg 1] set chan [lindex $arg 2] if {$c == $advert(netcode)} {  putlog "$advert(tag) Advertisment requested for $nick on $chan from $bot"  utimer [get_adverttime] "advert_do $nick $chan                            }}proc get_adverttime {} {global advert return [expr $advert(delay_base) + [rand $advert(delay)]]}proc advert_do {nick chan} {subst -nobackslashes -nocommands -novariables nickglobal adverts random_advert advert if {![probability $advert(prob)]} {return 1}if {[lsearch -glob $advert(ignore) [string tolower "*$chan*"] ] == -1 } { if {$advert(starterline) != ""} {  set txt [randomline $advert(starterline)]  regsub -all {\$chan} $txt "$chan" txt  putserv "$advert(type) $nick :$txt"                                 } if {$advert(gettype) == 0} {set theadvert [lindex $random_advert [rand [llength $random_advert]]]} if {$advert(gettype) == 1} {set theadvert [lindex $random_advert $advert(current)]                             set advert(current) [expr $advert(current) + 1]                             if {$advert(current) &gt; [llength $random_advert]} {set advert(current) 0}                            } putserv "$advert(type) $nick :$theadvert"                                                                    }}proc probability {prob} { if {$prob == 100} {return 1} set r [rand 100] set rng [rand [expr 100 - $prob]] set rngu [expr $rng + $prob] if {($r &gt; $rng) &amp;&amp; ($r &lt; $rngu)} {return 1} return 0}proc randomline {text} { return [lindex $text [rand [llength $text]]]}proc pub_adverts {nick uhost hand channel rest} {global advertsswitch [string tolower [lindex $rest 0]] { ""    { putserv "NOTICE $nick :Syntax: [cmdchar]adverts \[on/off\]" } "off" { set adverts 0 } "on"  { set adverts 1 } }if {$adverts == 0} { putserv "NOTICE $nick :Adverts are currentlly off"                   } else { putserv "NOTICE $nick :Adverts are currentlly on" }advert_write } bind pub m [cmdchar]adverts pub_adverts############# HELP SECTION #######################################[START]#proc adverthelp {nick channel dirc dire args} {global adverts advertset topic [string tolower [lindex $args 0]]if {([string length $topic]) &lt; 3} { sendit $nick $channel $dirc "Use \002ADVERTHELP help\002 to list avliable topics." }switch [string tolower $topic] { "status" {           if {($adverts == 0)} {set adverttemp Off} else {set adverttemp On}           sendit $nick $channel $dirc "Adverts are currentlly $adverttemp."          } "adverts" {           sendit $nick $channel $dirc "ADVERTS - Syntax: adverts \[on/off\]"           sendit $nick $channel $dirc "(MAS)    This command allows you to turn advertisments on or off."          } "addadvert" {           sendit $nick $channel $dirc "ADDADVERT - Syntax: addadvert &lt;advertline&gt;"           sendit $nick $channel $dirc "(MAS)    This command allows you to add an advertisment to the database."          } "deladvert" {           sendit $nick $channel $dirc "DELADVERT - Syntax: deladvert  &lt;number&gt;"           sendit $nick $channel $dirc "(MAS)    This command allows you to delete an advertisment from the database."          } "listadvert" {             sendit $nick $channel $dirc "LISTADVERT - Syntax: listadvert"             sendit $nick $channel $dirc "(OPs)      This command will list all advertisments in the database."             } "help" {     sendit $nick $channel $dirc "Help Topics Avaliable:"     sendit $nick $channel $dirc "listadvert deladvert addadvert adverts status"    }                             }}proc pub_adverthelp {nick uhost handle channel args} {global advertsendit $nick $channel 1 "Advert v$advert(ver) by David Proper (DrN)"adverthelp $nick $channel 1 1 $args} bind pub - [cmdchar]adverthelp pub_adverthelpproc msg_adverthelp {nick uhost handle args} {global advertsendit $nick $nick 2 "Advert v$advert(ver) by David Proper (DrN)"adverthelp $nick $nick 2 2 $args}bind msg - adverthelp msg_adverthelpproc dcc_adverthelp {handle idx args} {global advertsendit $idx $idx 4 "Advert v$advert(ver) by David Proper (DrN)"adverthelp $idx $idx 4 4 $args}bind dcc - adverthelp dcc_adverthelpproc sendit {nick channel dirc txt} { if {$dirc == "1"} { putserv "PRIVMSG $channel :$txt" } if {$dirc == "2"} { putserv "PRIVMSG $nick :$txt" } if {$dirc == "3"} { putserv "NOTICE $nick :$txt" } if {$dirc == "4"} { putdcc $nick "$txt" }}############# HELP SECTION #########################################[END]#set adverts_changed 0set random_advert ""set adverts 1set advert(current) 0advert_loadputlog "Advert v$advert(ver) by David Proper (DrN) -=:LoadeD:=-"return "Advert v$advert(ver) by David Proper (DrN) -=:LoadeD:=-"</code></pre></div>There you go <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=8985">nsrafk</a> — Sun May 27, 2007 8:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
