Skip to content

Instantly share code, notes, and snippets.

@AndrioCelos
Created July 19, 2015 14:20
Show Gist options
  • Save AndrioCelos/f4decc7e9b7882d3981d to your computer and use it in GitHub Desktop.
Save AndrioCelos/f4decc7e9b7882d3981d to your computer and use it in GitHub Desktop.
%add = $true;
%clones = ""; %cloneCount = 0;
for (%i=0;%i<$length(%PastUsers{$context});%i++) {
if ($0 == $mask.nick(%PastUsers{$context}[%i])) {
%add = $false;
}
elseif ($2 == $mask.host(%PastUsers{$context}[%i])) {
if (%cloneCount < 10) %clones <, " \r!n\r$mask.nick(%PastUsers{$context}[%i])\r";
%cloneCount++;
}
}
if (%cloneCount > 10) %clones <, " $(%cloneCount - 10) more"
if (%add) {
%PastUsers{$context}[%PastUsersCount{$context}] = "$0!$1@$2";
%PastUsersCount{$context}++;
if (%PastUsersCount{$context} == 200) %PastUsersCount{$context} = 0;
}
if ($length(%clones) != 0) {
echo -i=20 "$k(12)$b\r!nc\r$0\r$b draws near! ($1@\r!h\r$2\r – $k(6)clone of%clones$k(12))";
}
else {
echo -i=20 "$k(12)$b\r!nc\r$0\r$b draws near! ($1@\r!h\r$2\r)";
}
halt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment