Jump to content

Warrior124

Members
  • Posts

    993
  • Joined

  • Last visited

Posts posted by Warrior124

  1. You are correct. I accidentally left something out. This should work...

     

    if (!$hget($right(#,-2) $+ aop,%address)) && (!$hget(globalaop,%address)) && (%nick != $mnick) &&  (>* !iswm $nick(#,%nick).pnick)

  2. Ahhh thank you, Warrior. That is very handy to know. I Was wracking my brain trying to think of where I'd seen that, as I remembered seeing you use it somewhere some time ago.

    I shall impliment this immediately since my route of calling the event was VERY sloppy (ugly).

     

    Thanks again, my friends :)

     

    No problem. :)

  3. For future reference you can also get the rgb value of mirc colors by calling $rgb($color(<mirc color code here>))

     

    Blue: $rgb($color(12)) == 0,0,252

    Purple: $rgb($color(6)) == 156,0,156

  4. That's not a sign of an idiot, lol. There have been many codes I came up with that I looked at later and asked i it was me who made them codes. Sometimes I have to look at what I did a long time ago to remember certain things, lol. That's all part of scripting. :)

  5. Mainly it wasn't working because you were halting commands, and it couldn't move on to the other commands. The coding was wrong, but try this...

     

    menu channel {
      Anti Status
      .Anti Owner ( $+ $group(#antiowner) $+ )
      .$iif($group(#antiowner) == on,$style(2),$style(0)) On: .enable #antiowner | echo -a 0,12Anti-Owner $+ 0,94On
      .$iif($group(#antiowner) == off,$style(2),$style(0)) Off: .disable #antiowner | echo -a 0,12Anti-Owner $+ 0,4Off
      .Anti Host ( $+ $group(#antihost) $+ )
      .$iif($group(#antihost) == on,$style(2),$style(0)) On: .enable #antihost | echo -a 0,12Anti-Host $+ 0,94On
      .$iif($group(#antihost) == off,$style(2),$style(0)) Off: .disable #antihost | echo -a 0,12Anti-Host $+ 0,4Off
    }
    
    #antiowner off
    on *:OWNER:#:{
      if ($me isowner $chan) {
        if ($opnick == $me ) halt
        elseif ($nick == $me) halt
        else {
          mode $chan -q $opnick
          msg $chan Sorry $replace($nick,>,Guest_) $+ , only I set who becomes OWNER in this room
          access $chan delete OWNER $nick
          access $chan delete OWNER $address($nick,1)
        }
      }
    }
    #antiowner end
    
    #antihost off
    on *:oP:#:{
      if ($me isop $chan) {  
        if ($opnick == $me ) halt
        elseif ($nick == $me) halt
        else {
          mode $chan -o $opnick
          msg $chan Sorry $replace($nick,>,Guest_) $+ , only I set who becomes HOST in this room.
          access $chan delete HOST $nick
          access $chan delete HOST $address($nick,1)
        }
      }
    }
    #antihost end

  6. Don't know if this will be what you are looking for, but here it is.

     

    alias mjoin {
      var %tok = 1
      while (%tok <= $numtok($1-,44)) {
        join $iif($left($gettok($1-,%tok,44),2) == $chr(37) $+ $chr(35),$gettok($1-,%tok,44),$chr(32) $+ $chr(44) $+ $gettok($1-,%tok,44))
        inc %tok
      }
    }

  7. I'm just about done with it. I'm hoping to have it submitted within the next day, or two. Here is a little more I've done to it so far. I've added an auto updater to let the user know when there is an available update.

    post-216-1220680517_thumb.jpg

  8. Don't give up, lol. I've tried this out, and made some modifications. I had to take the $hget part out of the sline code as well as the $buzz.decode bit, because you didn't give an alias for it. I've also added the $ff alias code, and changed the way the dlls, and icons are called. Now it will show the nicknames, and the icons as well. It also opens up the mirc popup when you right click on the name in the nicklist. Here is the code...

     

    alias ff {
      if (!%ff. [ $+ [ $1- ] ]) || (!$exists(%ff. [ $+ [ $1- ] ])) {
        if (!$longfn($findfile($nofile($mircexe),$1-,1))) set %ff. [ $+ [ $1- ] ] $shortfn($nofile($mircexe) $+ $1-)
        else set %ff. [ $+ [ $1- ] ] $shortfn($findfile($nofile($mircexe),$1-,1))
      }
      return %ff. [ $+ [ $1- ] ]
    }
    alias ndll { return $ff(nicklist.dll) }
    alias mdx { return $ff(mdx.dll) }
    alias views { return $ff(views.mdx) }
    alias ico { return $ff($1) }
    on *:JOIN:#:{
      if ($nick == $me) {
        set %getsize $dll($ndll,GetSize,$!window(* $+ $right(#,-2) $+ *,1))
        if (!$dialog(nick. [ $+ [ # ] ])) { dialog -m nick. [ $+ [ # ] ] nick. [ $+ [ # ] ] }
        .timer.join -m 1 5 fugk
      }
      if (!$timer(ref)) { .timer.ref 1 1 fugk }
    }
    on *:PART:#:{
      if (!$timer(ref)) { .timer.ref 1 1 fugk }
    }
    alias fugk { refresh $active | partsb }
    on *:RAWMODE:#:{
      if (!$timer(ref)) { .timer.ref 1 1 fugk }
    }
    on *:KICK:#:{
      if (!$timer(ref)) { .timer.ref 1 1 fugk }
    }
    dialog nick.* {
      title ""
      size 0 0 112 329
      option dbu
      list 1, 0 0 114 329, size vsbar
    }
    
    on *:dialog:nick*:*:*:{
      if ($devent == init) {
        %crap = $dll($ndll,Nicklist,$dname $!window(* $+ $right($dname,-7) $+ *,1))
        dll $mdx SetMircVersion $version
        dll $mdx MarkDialog $dname
        dll $mdx SetDialog $dname style sysmenu
        dll $mdx SetControlMDX $dname 1 ListView report single noheader> $views
        dll $mdx SetDialog $dname bgcolor $rgb(000,000,000)
        did -i $dname 1 1 setbkg color 1 $rgb(000,000,000)
        did -i $dname 1 1 settxt color $rgb(255,255,255)
        did -i $dname 1 1 settxt bgcolor $rgb(000,000,000)
        did -i $dname 1 1 headerdims 150
        did -i $dname 1 1 iconsize 8 16 23 23
        did -i $dname 1 1 seticon normal 0, $+ $ico(staff.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(owner.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(host.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(novoice.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(voice.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(ignore.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(helpop.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(cup.ico)
        did -i $dname 1 1 seticon normal 0, $+ $ico(voiced.ico)
        did -i $dname 1 1 seticon normal 0, $+ iconmsn.ico
        refresh #
      }
      if (click isin $devent) {
        tokenize 32 $did($dname,$did,1)
        if ($1 == rclick) { sline $active $fline($active,$gettok($did($dname,1).seltext,6,32),1,1) | %null = $dll($ndll,Popup,$!window(* $+ $right($dname,-6) $+ *,1)) }
        if ($1 == sclick) { sline $right($dname,-5) $calc($did($dname,1).sel - 1) }
        if ($1 == dclick) { sline $right($dname,-5) $calc($did($dname,1).sel - 1) | query $nick($right($dname,-5),$calc($did($dname,1).sel - 1)) }
      }
    }
    alias nick.refresh { .timer -m 1 4 refresh $1 }
    alias -l refresh {
      if (!$dialog(nick. [ $+ [ $1 ] ])) return
      did -r nick. [ $+ [ $1 ] ] 1
      var %l 1
      while (%l <= $nick($1,0)) {
        did -a nick. [ $+ [ $1 ] ] 1 0 + $nickicon($nick($1,%l),$1) $replace($nick($1,%l),>,Guest_)
        inc %l
      }
    }
    alias nickicon {
      var %l 1 | while (%l <= 9) { if ($ignore($mask($address($1,5),%l))) { return 6 } | inc %l }
      if (' isin $1) return 1
      if ($1 isowner $2) return 2
      if ($1 isop $2) && ($1 !isowner $2) return 3
      if ($1 !isvoice $2) && (m isincs $chan($2).mode) return 4
      return 5
    }
    menu * {
      mouse:if ($hget(history. $+ $active,0)) click 2 $ifmatch
      sclick: { var %i = 1 | while ($hget(button. $+ $active,%i)) { tokenize 59 $ifmatch | if ($inrect($mouse.x,$mouse.y,$1,$2,$3,$4)) { hadd -m history. $+ $active 0 %i | click 1 %i | break } | inc %i } }
      uclick:if ($hget(history. $+ $active,0)) click 3 $ifmatch
    }

  9. This should now work for you. I added a code that will find your icons no matter where (within your mirc directory) you place your icons. Also works the same way for your dll files.

     

    on *:Start:/dialog -m nicklist nicklist
    
    dialog Nicklist {
      title "nicklist"
      size -1 -1 112 256
      option dbu
      list 1, 1 0 106 255, size vsbar
    }
    
    
    on *:Dialog:nicklist:init:*: {
      dll $ff(rebar.dll) Dock $dialog(nicklist).hwnd > right
      dll $ff(mdx.dll) SetMircVersion $version
      dll $ff(mdx.dll) MarkDialog $dname
      dll $ff(mdx.dll) SetFont $dname
      dll $ff(mdx.dll) SetFont $dname 1 14 50 verdana
      dll $ff(mdx.dll) SetColor $dname
      dll $ff(mdx.dll) SetColor $dname 1 text $rgb (0,0,139)
      dll $ff(mdx.dll) SetControlMDX $dname 1 ListView noheader smallicon hottrack single > $ff(views.mdx)
      did -i $dname 1 1 iconsize normal small
      did -i $dname 1 1 seticon normal 0, $+ $ff(owner.ico)
      did -i $dname 1 1 seticon normal 0, $+ $ff(host.ico)
      did -i $dname 1 1 seticon normal 0, $+ $ff(spec.ico)
      did -i $dname 1 1 seticon normal 0, $+ $ff(voice.ico)
      did -i $dname 1 1 settxt color $rgb(0,0,139)
    
      nickinlist
    }
    
    alias nickinlist{
      did -r nicklist 1
    
      var %n 1
      while (%n <= $nick($active,0)) {
    
        did -a nicklist 1 0 + $nicklisticon($nick($active,%n)) $nick($active,%n)
    
        inc %n
      }
    }
    
    alias ff {
      if (!%ff. [ $+ [ $1- ] ]) || (!$exists(%ff. [ $+ [ $1- ] ])) {
        if (!$longfn($findfile($nofile($mircexe),$1-,1))) set %ff. [ $+ [ $1- ] ] $shortfn($nofile($mircexe) $+ $1-)
        else set %ff. [ $+ [ $1- ] ] $shortfn($findfile($nofile($mircexe),$1-,1))
      }
      if (!$exists(%ff. [ $+ [ $1- ] ])) echo $color(info) -a $nopath(%ff. [ $+ [ $1- ] ]) cannot be found anywhere within this directory. Please download, and install.
      return %ff. [ $+ [ $1- ] ]
    }
    
    alias nicklisticon {
      if($1 isowner $active) return 1
      elseif ($1 isop $active) return 2
      elseif (*+*m* iswm $chan($active).mode) && ($1 !isvoice $active) return 4
      elseif (*+*m* !iswm $chan($active).mode) && ($1 isvoice $active) return 3
      elseif (*+*m* iswm $chan($active).mode) && ($1 isvoice $active) return 3
      elseif (*+*m* !iswm $chan($active).mode) && ($1 !isvoice $active) return 3
    }
    
    on *:join:*: {
      if ($nick == $me) { .timernl -m 1 9 nickinlist }
    }

×
×
  • Create New...