Coders-IRC


IRC for Coders

Multi-owner script


image

1. Press alt+r to bring up script window.
2. Go to File > New
3. Paste code from box above into the window.
4. Replace #your.channel.here with your channel name.
5. Right-click on the nick you want to add/delete.
6. Find "Owners", and click to add/delete them or list all the users in the database.
7.Jason stinks. You have to be connected to one of those irc server things.
8. Make sure you have ownermode set on your channel. (/msg chanserv set #channel ownermode on)


Auto-owner v1.0

on *:start: { hload ownertable owners.txt }

on *:join:#your.channel.here: { if ($find(ownertable,$nick)) { mode $chan +q $nick } }

menu nicklist {

Owners

.Add: {

if (!$hget(ownertable)) { hmake ownertable 10 }

if ($hfind(ownertable,$1)) { echo -a 07 $+ $timestamp *** User $1 already exists in the owner database. }

else {

hadd ownertable $1 1

hsave -a ownertable owners.txt

echo -a 07 $+ $timestamp *** User $1 added to the owner database.

}

}

.Del: {

if ($hfind(ownertable,$1)) { hdel ownertable $1 | echo -a 07 $+ $timestamp *** User $1 removed from the owner database. }

else { echo -a 7 $+ $timestamp *** User $1 not found in the owner database. }

}

.-

.List: {

if ($hget(ownertable,0).item == 0) { echo -a 07 $+ $timestamp *** No users currently exist in the owner database. | halt }

echo -a 7 $+ $timestamp *** Users that are set to be auto +q'd:

var %ownernum = $hget(ownertable,0).item

while (%ownernum) {

echo -a 07 $+ $timestamp *** $calc($hget(ownertable,0).item - %ownernum + 1) $+ . $hget(ownertable,%ownernum).item

dec %ownernum

}

echo -a 7 $+ $timestamp *** End of list. $hget(ownertable,0).item $+ $iif($hget(ownertable,0).item == 1,user,users) $iif($hget(ownertable,0).item == 1,exists,exist) in the owner database.

}

}

Comments 0