<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Very_simple_Peak_script</id>
	<title>Very simple Peak script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Very_simple_Peak_script"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Very_simple_Peak_script&amp;action=history"/>
	<updated>2026-06-04T03:28:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Very_simple_Peak_script&amp;diff=3796&amp;oldid=prev</id>
		<title>Tovrleaf: links enabled</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Very_simple_Peak_script&amp;diff=3796&amp;oldid=prev"/>
		<updated>2005-09-02T10:49:58Z</updated>

		<summary type="html">&lt;p&gt;links enabled&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A script that remembers the user record of channels.&lt;br /&gt;
Shows the record when someone types !peak&lt;br /&gt;
&lt;br /&gt;
 ;Execute the following every time someone (including you) joins a channel&lt;br /&gt;
 [[on_join|on *:join]]:#: {&lt;br /&gt;
  ;If the variable (%peak.#channel) where we save user peak doesn&amp;#039;t already exist, set it to 0&lt;br /&gt;
  [[If-Then-Else|if]] (!%peak. [ $+ [ $chan ] ]) {&lt;br /&gt;
    [[set]] %peak. $+ [[$chan]] 0&lt;br /&gt;
  }&lt;br /&gt;
  ;If the total amount of users is more than the old value of %peak.#channel, set the variable to the new total amount&lt;br /&gt;
  if ([[$nick]]($chan,0) &amp;gt; %peak. [ $+ [ $chan ] ]) {&lt;br /&gt;
    set %peak. $+ $chan $ifmatch&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ;Make the script do something every time someone says !peak&lt;br /&gt;
 on *:text:!peak:#: {&lt;br /&gt;
  ;This here is to prevent people flooding you out&lt;br /&gt;
  ;If a variable called %peakspam.#channel does not exist, continue&lt;br /&gt;
  if (!%peakspam. [ $+ [ $chan ] ]) {&lt;br /&gt;
    ;Save a variable called %peakspam.#channel for 10 seconds&lt;br /&gt;
    set -u10 %peakspam. $+ $chan 1&lt;br /&gt;
    ;Send a message to the channel telling people what the user record is&lt;br /&gt;
    [[msg]] $chan User peak for $chan is: %peak. [ $+ [ $chan ] ]&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ;Please note:&lt;br /&gt;
 ;If you join a channel and someone says !peak before another person has joined, it will [[return]] &amp;quot;1&amp;quot;&lt;br /&gt;
 ;This is due to [[mIRC]] not knowing the total number of users when joining a new channel&lt;br /&gt;
 ;It could be fixed pretty easily, but as this is supposed to be a &amp;#039;very simple&amp;#039; script.. :)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Evaluation brackets]] are used for evaluating identifiers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;/div&gt;</summary>
		<author><name>Tovrleaf</name></author>
	</entry>
</feed>