Skip to content
TG007 community snippet #93

Multi-owner script

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

By chain Added Mar 24, 2021
General IRC All snippets
mIRC script 28 lines
About this snippet

Overview

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)
Source code

mIRC script

28 lines · 1,379 characters
;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.
  }
Community

Comments

Want to join the discussion? Sign in to TG007.
No comments yet. Start the discussion.