Results 1 to 5 of 5

Thread: Multi-owner script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    14

    Default Multi-owner script

    [00:49.33] * LilDee (~LilDee@GLITCH.KIDS) has joined #help
    [00:49.42] <LilDee> How do I make it so when someone joins, they get owner?
    [00:50.05] * LimitServ sets mode: +l 109
    [00:50.12] <+twilightBlanc> you can't
    [00:50.16] <%Jason> you either have to give them channel password
    [00:50.18] <+twilightBlanc> unless you write a script
    [00:50.20] <%Jason> or make a script to do it
    [00:50.41] <LilDee> ok thx
    [00:51.11] <%Jason> shocked no one has made a script of that yet and posted it on the website

    Code:
    ;Auto-owner v1.0 final by twilightNoir
    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.
      }
    }
    Written for mIRC.

    Quick 10-step guide to installing this 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 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)
    9. ????
    10. Profit!

    Notes:
    -Only works for the channel(s) you specify.
    -You can add more channels by typing a comma after your channel and typing another channel name; however, everyone in the database will get owner in both channels. You can do this for as many channels as you like.
    -No, I'm not gonna add in support to add people for one channel and not another.
    Last edited by twilightNoir; 07-13-2009 at 12:47 PM.

  2. #2
    Junior Member dsboy's Avatar
    Join Date
    May 2009
    Posts
    21

    Default

    Maybe change

    Code:
    ;Auto-owner v1.0 final by twilightNoir on *:start: { hload ownertable owners.txt } on *:join:#your.channel.here: { if ($find(ownertable,$nick)) { mode $chan +q $nick } } menu nicklist {

    To

    Code:
    ;Auto-owner v1.0 final by twilightNoir on *:start: { hload ownertable owners.txt } on *:join:$chan : { if ($find(ownertable,$nick)) { mode $chan +q $nick } } menu nicklist {

    And now it Works on all channels
    Rizon User

  3. #3
    Rizon Staff
    Join Date
    Apr 2006
    Posts
    1,215

    Default

    Apart from the fact that $chan is not gonna work there (has to be # for all channels),
    you usually don't want to give +q to those selected users on all channels they join, not to mention that you usually don't have +q on all those channels yourself.

    A better option would be making the menu add the selected user to be auto-given +q on that current channel only.

  4. #4
    Junior Member
    Join Date
    Aug 2008
    Posts
    14

    Default

    usually people just want it for one channel, and then they find out the drama of having multiple owners and never use it again. to have multiple channels would be too much effort to code, as you'd have to make a while loop to go through all the channels in the table, code a method to add channels, check for existing channels, search and remove existing channels, etc. And if I'd go that far, I'd end up writing a dialog gui for it too.

    If anyone else wants to add on stuff or whatever, feel free too. I only wrote this because Jason wanted it written.

  5. #5

    Default

    Is there anything like that but more contemporary?

Similar Threads

  1. Bomb script
    By Danfire0 in forum IRC client scripts and addons
    Replies: 3
    Last Post: 08-18-2009, 08:17 PM
  2. Feetys Poll Script
    By Yteef in forum IRC client scripts and addons
    Replies: 4
    Last Post: 07-07-2009, 06:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •