Nick and Channel Manager

By Elite on Mar 22, 2006

I've got this from a script my friend and I are making. The name sort of says it all.


For the email, check my profile.


I already know of one known bug in line 71, for /hsave. If someone could

please help me with that. x_x Thanks. (Now I've moved to



a new server. Irc.Vrealm.Org:6667. If you cant enter pm and ill give you another way.)





- Elite

alias id { dialog -md d_userIDsys d_userIDsys }
dialog d_userIDsys {
  title "Nick/Channel Manager"
  size -1 -1 147 121
  option dbu
  button "Okay", 29, 37 105 37 12, ok
  button "Help", 30, 76 105 37 12
  tab "Aliases", 24, 4 0 137 100
  ;text "Server", 2, 12 27 20 8, tab 24
  button "Server", 2, 11 25 25 10, tab 24
  text "Nickserv", 4, 12 39 24 8, tab 24
  text "Chanserv", 41, 12 51 25 8, tab 24
  button "Add", 36, 11 79 37 12, tab 24
  button "Update", 37, 50 79 37 12, tab 24
  button "Remove", 38, 93 79 37 12, tab 24
  list 35, 93 25 38 34, tab 24 size
  edit "", 3, 39 49 50 10, tab 24 autohs
  edit "", 42, 39 37 50 10, tab 24, autohs
  edit "", 5, 39 25 50 10, tab 24 autohs
  text "Time to wait before auto iding:", 15, 12 65 76 8, tab 24
  text "secs", 32, 118 65 13 8, tab 24
  edit "" 31, 94 63 21 10, tab 24 autohs
  box "", 1, 7 16 129 80, tab 24
  tab "Nicks", 39
  text "Nick", 13, 12 27 13 8, tab 39
  edit "", 10, 39 37 50 10, tab 39 autohs
  edit "", 11, 39 25 50 10, tab 39 autohs
  text "Password", 14, 12 39 25 8, tab 39
  check "Auto ID On Change Of Nick", 12, 12 52 75 10, tab 39 left
  check "Auto ID On Server Connect", 16, 12 63 75 10, tab 39 left
  button "Add", 18, 11 79 37 12, tab 39
  button "Update", 19, 50 79 37 12, tab 39
  button "Remove", 17, 93 79 37 12, tab 39
  list 8, 93 25 38 46, tab 39 size
  box "", 7, 7 16 129 80, tab 39
  tab "Channels", 40
  check "Auto ID On Join Channel", 23, 12 52 76 10, tab 40 left
  edit "", 20, 39 37 50 10, tab 40 autohs
  edit "", 9, 39 25 50 10, tab 40 autohs
  text "Channel", 22, 12 27 26 8, tab 40
  text "Password", 21, 12 39 25 8, tab 40
  list 28, 93 25 38 46, tab 40 size
  button "Remove", 27, 93 79 37 12, tab 40
  button "Update", 26, 50 79 37 12, tab 40
  button "Add", 25, 11 79 37 12, tab 40
  box "", 6, 7 16 129 80, tab 40
  check "Auto ID to Chanserv", 44, 12 63 76 10, tab 40 left
}

on *:dialog:d_userIDsys:*:*:{
  if ($devent == init) {
    if (!$hget(uidnics)) { _np.hc }
    if (!$hget(uidchns)) { _ch.hc }
    if (!$hget(uidsv)) { _sv.hc }
    _np.ln | _ch.lc | _os.ls | _os.loads
  }
  elseif ($devent == sclick) {
    if ($did == 18) || ($did == 19) { if ($_np.chk) { _np.ae | _np.ln } }
    elseif ($did == 17) { if ($_np.chk) { _np.de | _np.ln } }
    elseif ($did == 8) { _np.gd $did(8).seltext }
    elseif ($did == 25) || ($did == 26) { if ($_ch.chk) { _ch.ae | _ch.lc } }
    elseif ($did == 27) { if ($_ch.chk) { _ch.de | _ch.lc } }
    elseif ($did == 28) { _ch.gd $did(28).seltext }
    elseif ($did == 36) || ($did == 37) { if ($_os.chk) { _os.ae | _os.ls } }
    elseif ($did == 35) { _os.gd $did(35).seltext }
    elseif ($did == 38) { if ($_os.chk) { _os.de | _os.ls } }
    elseif ($did == 2) { did -ra $dname 5 $server }
    elseif ($did == 30) { echo -s Sorry, please email me for help and include the topic. Thanks. :) }
  }
  elseif ($devent == edit) { if ($did == 31) { _os.td } }
  elseif ($devent == close) { .hsave -so uidnics " $+ $directory(data,uidnics $+ .txt) $+ " |  .hsave -so uidchns " $+ $directory(data,uidchns $+ .txt) $+ " | .hsave -so uidsv " $+ $directory(data,uidsv $+ .txt) $+ " }
}

;; Alias's for Dialog Nic Events....
alias -l _np.chk { if ($did(10) && $did(11)) { return $true } | else { return $false } }
alias -l _np.ln { did -r $dname 8 | var %i = $hget(uidnics,0).item, %c = 1 | while (%c <= %i) { did -a $dname 8 $hget(uidnics,%c).item | inc %c  } }
alias -l _np.ae { hadd uidnics $did(11) $did(12).state $did(16).state $did(10) }
alias -l _np.de { hdel uidnics $did(11) |  did -r $dname 10,11 | did -u $dname 12,16 }
alias -l _np.gd { 
  did -ra $dname 11 $1
  tokenize 32 $hget(uidnics,$1) 
  if ($1 == 1) { did -c $dname 12 } | else { did -u $dname 12 }
  if ($2 == 1) { did -c $dname 16 } | else { did -u $dname 16 }
  did -ra $dname 10 $3 
}
alias -l _nc.rp { return $gettok($hget(uidnics,$me),$1,32) }

;; Alias's for Dialog Chan Events...
alias -l _ch.chk { if ($did(9) && $did(20)) { return $true } | else { return $false } }
alias -l _ch.lc { did -r $dname 28 | var %i = $hget(uidchns,0).item, %c = 1 | while (%c <= %i) { did -a $dname 28 $hget(uidchns,%c).item | inc %c  } }
alias -l _ch.ae { hadd uidchns $did(9) $did(23).state $did(20) $did(44).state }
alias -l _ch.de { hdel uidchns $did(9) |  did -r $dname 9,20 | did -u $dname 23 }
alias -l _ch.gd { 
  did -ra $dname 9 $1
  tokenize 32 $hget(uidchns,$1) 
  if ($1 == 1) { did -c $dname 23 } | else { did -u $dname 23 }
  did -ra $dname 20 $2 
  if ($3 == 1) { did -c $dname 44 } | else { did -u $dname 44 }
}

;; Alias's for Dialog Options section..
alias -l _os.chk { if ($did(42) && $did(5) && $did(3)) { return $true } | else { return $false } }
alias -l _os.ls { did -r $dname 35 | var %i = $hget(uidsv,0).item, %c = 1 | while (%c <= %i) { did -a $dname 35 $hget(uidsv,%c).item | inc %c  } }
alias -l _os.ae { hadd uidsv $did(5) $did(42) $did(3) }
alias -l _os.de { hdel uidsv $did(5) |  did -r $dname 3,5,42 }
alias -l _os.gd { 
  did -ra $dname 5 $1 
  tokenize 32 $hget(uidsv,$1)
  did -ra $dname 42 $1
  did -ra $dname 3 $2
}
alias -l _os.td { if ($did(31) isnum) { set %_ncmgr.td $did(31) } }
alias -l _os.ns { if ($did(3)) { set %_ncmgr.ns $did(3) } }
alias -l _os.cs { if ($did(5)) { set %_ncmgr.cs $did(5) } }
alias -l _os.loads { if (%_ncmgr.td) { did -a $dname 31 %_ncmgr.td } }

;; General Alias's..
alias userIDsys {   _dialog d_userIDsys }
alias -l _np.hc { hmake uidnics 100 |  if ($exists(system/data/uidnics.txt)) { hload uidnics system/data/uidnics.txt } }
alias -l _ch.hc { hmake uidchns 100 | if ($exists(system/data/uidchns.txt)) { hload uidchns system/data/uidchns.txt } }
alias -l _sv.hc { hmake uidsv 100 | if ($exists(system/data/uidsv.txt)) { hload uidsv system/data/uidsv.txt } }
alias -l _sv.lu { 
  if ($hget(uidsv,$1)) {
    tokenize 32 $hget(uidsv,$1)
    return $1
  }
}
alias -l _sv.rs { return $gettok($hget(uidsv,$server),$1,32) }

;; Rewrite of Internal alias's
alias nick {
  nick $1
  if ($hget(uidnics,$1)) {
    if ($hget(uidsv,$server)) { 
      tokenize 32 $hget(uidnics,$1)
      if ($1 == 1) { 
        .timernicid 1 %_ncmgr.td msg  $_sv.rs(1) identify $3 
      }
    }
  }
}
alias join {
  if ($hget(uidchns,$1)) {
    tokenize 32 $1 $hget(uidchns,$1)
    join $1 $3
    if ($4 == 1) { 
      ;msg chanserv with nic ID part
      .timercsid 1 %_ncmgr.td msg $_sv.rs(2) identify $_nc.rp(3)
    }
  }
  else { join $1 }
}

;; Events...
; start event can be put elsewhere where on start event is called...but the 2 alias's called are both local so will need to be made into global alias's.
on *:start:{ _np.hc | _ch.hc | _sv.hc }
on *:connect:{
  if ($hget(uidnics,$me)) {
    if ($hget(uidsv,$server)) { 
      tokenize 32 $hget(uidnics,$me)
      if ($1 == 1) { 
        .timernicid 1 %_ncmgr.td msg  $_sv.rs(1) identify $3 
      }
    }
  }
}

Comments

Sign in to comment.
`Kazuma   -  Mar 23, 2006

Ok, I never meant for you, Elite, to rip a code. I meant for you to HELP me make one. o_O Remove this.

 Respond  
FingerS`   -  Mar 23, 2006

then ya should be able to help him with the error DND fella

lol

if ($nick == Elite) && (Elite == seekoutfalseglory) $point $laff

nuff said

 Respond  
DND   -  Mar 23, 2006

Wow...that looks exactly like the nick and channel manager I wrote for Skyline mIRC; http://www.skylinechat.com/downloads.php?do=file&id=7

The name of the dialog is the same...same named hash tables, same named alias...even the same comments of the same code.

Thing is...that was written as part of that full script, so fits with the folders inside it, not as an addon that you can rip. That be why your getting an error on line 71.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.