Jump to content

Aop Help


Molson™

Recommended Posts

on ^*:JOIN:#:{
  if ($nick != $me) {
    if ($me !isowner $chan) { Halt }
    if ($hget(AOP.ini,Global,$ial($nick).addr)) {
      var %a = ($hget(AOP.ini,Global,$ial($nick).addr)
      msg # Globalq $nick ( $+ $ial($nick).addr $+ )  Reason $hget(Aop,%A).item
      .RAW -q MODE # +q $nick 
    }
  }

 

 

 

Anyone know how I get the reason to show? also for nicklist to add the reason too.

 

 

 

 

 

 

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

#userlist on
on ^*:join:#:{
  if ($left($nick,1) == >) && ($nick != $me) && (D21DB211 !isin $address) && ($me isop #) && (>null != $nick) && (%guestkick == ON) {
    .timer 1 1 { /set %guestflood 1 }
    .inc %guestflood
    .kick $chan $nick oi! You Must Be A Bot! BAD! 
    .access $chan add deny $address($nick,1)  
  }
  if (oneq isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) && ($nick !isowner $chan) && ($chan isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) { 
    .timeraop 1 3 { .mode $chan +q $nick }
    .access $chan add owner *! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @* 0 : 14AutoOp 
  }
  if (oneo isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) && ($nick !isowner $chan) && ($chan isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) { 
    .mode $chan +o $nick
    .access $chan add host *! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @* 0 : 14AutoOp
  }
  if (globalq isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) && ($me isowner #) {
    .mode $chan +q $nick
    .access $chan add owner *! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @* 0 : 14AutoOp
  }
  if (globalo isin $level(*! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @*)) && ($me isowner #) {
    .mode $chan +q $nick
    .access $chan add owner *! $+ $gettok($gettok($ial($nick),2,33),1,64) $+ @* 0 : 14AutoOp
  }
  if ($ulist($address,Identifier,1) == $address($nick,1)) { 
    window -mk0 @Indentifier
    echo @Indentifier 4‹14 $+ $time(h15:14nn15t14)4-14 $+ 4-14 $+ $nick Is $ulist($address,Identifier,1).info In $chan $+ 4› | halt 
  }
  if ($ulist($address,shit,1) == $address($nick,1)) && ($me isop #) {
    access $chan clear 
    access $chan add deny $address($nick,1)
    kick $chan $nick 4‹14shitx4/14Reason4:14 $+ $ulist($address,shit,1).info $+ 4›
    prop $chan ownerkey $chr($rand(32,255)) $+ œ $+ $rand(a,z) $+ $chr($rand(32,255)) $+ [autokick] $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255))  $+ $rand(1,900) $+ œ $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) 
    access $chan add owner 66.231.3* 0 : 4‹15(14deceptionx15)4›
  }
  else { /halt }
}
#userlist end

menu nicklist {
  » ulist
  .a/k:
  ..add:/.auser shit $address($$1,1) $$?="reason.." | /echo # 4[14 $+ $$1 Added To Auto Kick/Ban List4] | /access # clear | /access # add deny $address($$1,1) | /kick # $$1 | /prop # ownerkey $chr($rand(32,255)) $+ œ $+ $rand(a,z) $+ $chr($rand(32,255)) $+ [autokick] $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255))  $+ $rand(1,900) $+ œ $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) $+ $chr($rand(32,255)) | halt | haltdef  
  ..rem:/.ruser shit $address($$1,1) | /echo # 4[14 $+ $$1 Removed From Auto Kick/Ban List4] | halt | haltdef
  .global +q
  ..add:/auser globalq *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Added To Global +q4] | /mode # +q $$1
  ..rem:/ruser globalq *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Removed From Global +q4] | halt
  .global +o
  ..add:/auser globalo *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Added To Global +o4] | /mode # +o $$1 
  ..rem:/ruser globalo *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Removed From Global +o4] | halt
  .active +q
  ..add:/auser -a oneq $+ $chan *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Added To Owner List For # $+ 4] | /mode # +q $$1 
  ..rem:{ /ruser oneq $+ $chan *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* | /echo -a 4[14 $+ $$1 Removed From Owner List For # $+ 4] | halt }
  .active +o
  ..add:{ /auser -a oneo $+ $chan *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* : $+ $$1 | /echo -a 4[14 $+ $$1 Added To Host List For # $+ 4] | /mode # +o $$1 | halt }
  ..rem:/ruser oneo $+ $chan *! $+ $gettok($gettok($ial($$1),2,33),1,64) $+ @* | /echo -a 4[14 $+ $$1 Removed From Host List For # $+ 4] 
  .Identifier
  ..add:/.auser Identifier $address($$1,1) $$1 | echo # 4[14 $+ $converter($$1) Added To Indintifier List4] | mode # +v $$1 | haltdef
  ..rem:/.ruser Identifier $address($$1,1) | echo # 4[14 $+ $converter($$1) Removed From Indentifier List4] | mode # -v $$1 | haltdef 
}
menu menubar {
  » user list
  .$iif(%userlist == ON,$style(1)) on:/set %userlist ON | /enable #userlist 
  .$iif(%userlist == OFF,$style(1)) off:/set %userlist OFF | /disable #userlist
}

 

NOTE: not mine, my nefue made as i recall a while ago, edit it to your uses

 

alias userlists {
  if ($1 == file) { return User_Lists[v1]\User_Lists.ini } 
  if ($1 == status) { return $readini(User_Lists[v1]\User_Lists.ini,userlists,status) }
  if ($1 == message) {  
    if ($2 == autokick) { 
      if ($3 == added) { return $+(userlists[a-kick\added]) }
      elseif (!$3) { return $+(userlists[a-kick\,$readini(User_Lists[v1]\User_Lists.ini,kick,$ial($nick).addr),]) }
    }
  }
  if ($1 == scan) { 
    if (!$2) { echo -a $theme(time) error $theme(x) userlists 1:2 you did not specify a channel1...2 }
    elseif ($2) { 
      echo -a $theme(time) 1* ------------------------------2 | echo -a $theme(time) 1*2 scanning $+($lower($theme(replace,$left($2,7))),1...2) for users1...2 | echo -a $theme(time) 1* ------------------------------2
      var %cnt = 1, %ttl = $nick($2,0), %users = 0
      while (%cnt <= %ttl) { $iif($readini($userlists(file),kick,$ial($nick($2,%cnt)).addr),echo -a $theme(time) 1*2 $+(kick,$str( ,2)) $theme(x) $nick($2,%cnt)) | inc %cnt }
      var %cnt = 1
      while (%cnt <= %ttl) { 
        $iif($readini($userlists(file),gowner,$ial($nick($2,%cnt)).addr),echo -a $theme(time) 1*2 gowner $theme(x) $nick($2,%cnt))
        inc %cnt
      }
      var %cnt = 1
      while (%cnt <= %ttl) { $iif($readini($userlists(file),gvoice,$ial($nick($2,%cnt)).addr),echo -a $theme(time) 1*2 gvoice $theme(x) $nick($2,%cnt)) | inc %cnt }
      var %cnt = 1 
      while (%cnt <= %ttl) { $iif($readini($userlists(file),$+(lowner.,$remove($2,$chr(35),$chr(37))),$ial($nick($2,%cnt)).addr),echo -a $theme(time) 1*2 lowner $theme(x) $nick($2,%cnt)) | inc %cnt }
      var %cnt = 1 
      while (%cnt <= %ttl) { $iif($readini($userlists(file),$+(lhost.,$remove($2,$chr(35),$chr(37))),$ial($nick($2,%cnt)).addr),echo -a $theme(time) 1*2 lhost  $theme(x) $nick($2,%cnt)) | inc %cnt }
      echo -a $theme(time) 1* ------------------------------2 | echo -a $theme(time) 1*2 scan complete1...2 | echo -a $theme(time) 1* ------------------------------2
    }
  }
}

menu menubar,status,nicklist { 
  -
  User Lists
  .$iif($userlists(status) == on,$style(2)) Enable:{ writeini -n $userlists(file) userlists status on | echo -a $theme(time) user lists $theme(x) enabled1...2 }
  .$iif($userlists(status) != on,$style(2)) Disable:{ writeini -n $userlists(file) userlists status off | echo -a $theme(time) user lists $theme(x) disabled1...2 }
  .-
  .$iif($readini($userlists(file),halt,$active) == on,$style(1)) $iif($me ison #,Halt Channel) {
    if ($readini($userlists(file),halt,$active) == on) { remini $userlists(file) halt $active * | echo -a $theme(time) user lists $theme(x) halt for $remove($active,$chr(35),$chr(37)) 1:2 removed1...2 } 
    elseif (!$readini($userlists(file),halt,$active)) { writeini -n $userlists(file) halt $active on | echo -a $theme(time) user lists $theme(x) halt for $remove($active,$chr(35),$chr(37)) 1:2 added1...2 }
  }
  .-
  .$iif($me ison #,Auto Kick)
  ..$iif($readini($userlists(file),kick,$ial($$1).addr),$style(2)) Add:{
    writeini -n $userlists(file) kick $ial($$1).addr $$?="Enter Reason:" | echo -a $theme(time) user lists $theme(x) a_kick 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2)
    if ($me isowner $active) { 
      if ($$1 isowner $active) { sockwrite -n $socket($active) ACCESS $active CLEAR $lf KICK $active $$1 $userlists(message,autokick,added) $lf PROP $active OWNERKEY $keyz $lf PROP $active HOSTKEY $keyz }
    }
    if ($me isowner $active) || ($me isop $active) { 
      if ($$1 isop $active) && ($$1 !isowner $active) { sockwrite -n $socket($active) ACCESS $active CLEAR HOST $lf ACCESS $active CLEAR VOICE $lf ACCESS $active CLEAR GRANT $lf KICK $active $$1 $userlists(message,autokick,added) }
      elseif ($$1 !isop $active) && ($$1 !isowner $active) { sockwrite -n $socket($active) KICK $active $$1 $userlists(message,autokick,added) }
    }
  }
  ..$iif(!$readini($userlists(file),kick,$ial($$1).addr),$style(2)) Rem:{ remini $userlists(file) kick $ial($$1).addr * | echo -a $theme(time) user lists $theme(x) a_kick 1:2 rem $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  ..-
  ..$iif($readini($userlists(file),kick,$ial($$1).addr),$style(2)) Quick Add:{ 
    writeini -n $userlists(file) kick $ial($$1).addr quick.add | echo -a $theme(time) user lists $theme(x) a_kick 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2)
    if ($me isowner $active) { 
      if ($$1 isowner $active) { sockwrite -n $socket($active) ACCESS $active CLEAR $lf KICK $active $$1 $userlists(message,autokick,added) $lf PROP $active OWNERKEY $keyz $lf PROP $active HOSTKEY $keyz }
    }
    if ($me isowner $active) || ($me isop $active) { 
      if ($$1 isop $active) && ($$1 !isowner $active) { sockwrite -n $socket($active) ACCESS $active CLEAR HOST $lf ACCESS $active CLEAR VOICE $lf ACCESS $active CLEAR GRANT $lf KICK $active $$1 $userlists(message,autokick,added) }
      elseif ($$1 !isop $active) && ($$1 !isowner $active) { sockwrite -n $socket($active) KICK $active $$1 $userlists(message,autokick,added) }
    }
  }
  .-
  .$iif($me ison #,Global Owner)
  ..$iif($readini($userlists(file),gowner,$ial($$1).addr),$style(2)) Add:{ writeini -n $userlists(file) gowner $ial($$1).addr $$1 | echo -a $theme(time) user lists $theme(x) g_owner 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  ..$iif(!$readini($userlists(file),gowner,$ial($$1).addr),$style(2)) Rem:{ remini $userlists(file) gowner $ial($$1).addr * | echo -a $theme(time) user lists $theme(x) g_owner 1:2 rem $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  .$iif($me ison #,Global Voice)
  ..$iif($readini($userlists(file),gvoice,$ial($$1).addr),$style(2)) Add:{ writeini -n $userlists(file) gvoice $ial($$1).addr $$1 | echo -a $theme(time) user lists $theme(x) g_voice 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  ..$iif(!$readini($userlists(file),gvoice,$ial($$1).addr),$style(2)) Rem:{ remini $userlists(file) gvoice $ial($$1).addr * | echo -a $theme(time) user lists $theme(x) g_voice 1:2 rem $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  .-
  .$iif($me ison #,Local Owner)
  ..$iif($readini($userlists(file),$+(lowner.,$remove(#,$chr(35),$chr(37))),$ial($$1).addr),$style(2)) Add:{ writeini -n $userlists(file) $+(lowner.,$remove($active,$chr(35),$chr(37))) $ial($$1).addr $$1 | echo -a $theme(time) user lists $theme(x) l_owner 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  ..$iif(!$readini($userlists(file),$+(lowner.,$remove(#,$chr(35),$chr(37))),$ial($$1).addr),$style(2)) Rem:{ remini $userlists(file) $+(lowner.,$remove($active,$chr(35),$chr(37))) $ial($$1).addr * | echo -a $theme(time) user lists $theme(x) l_owner 1:2 rem $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  .$iif($me ison #,Local Host)
  ..$iif($readini($userlists(file),$+(lhost.,$remove(#,$chr(35),$chr(37))),$ial($$1).addr),$style(2)) Add:{ writeini -n $userlists(file) $+(lhost.,$remove($active,$chr(35),$chr(37))) $ial($$1).addr $$1 | echo -a $theme(time) user lists $theme(x) l_host 1:2 add $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  ..$iif(!$readini($userlists(file),$+(lhost.,$remove(#,$chr(35),$chr(37))),$ial($$1).addr),$style(2)) Rem:{ remini $userlists(file) $+(lhost.,$remove($active,$chr(35),$chr(37))) $ial($$1).addr * | echo -a $theme(time) user lists $theme(x) l_host 1:2 rem $+(1[2,$$1,1\2,$left($ial($$1).addr,17),1*]2) }
  .-
  .$iif($me ison #,Scan Channel) { userlists scan # }
  .Open File:{ run $userlists(file) }
}

menu channel {
  -
  $iif($me ison #,Scan Channel) { userlists scan # }
  -
}

on ^*:join:#:{      
  if ($nick != $me) && ($userlists(status) == on) && (!$readini($userlists(file),halt,#)) {     
    var %c = $remove($chan,$chr(37),$chr(35))                                                                                                            
    if ($me isowner #) { 
      if ($readini($userlists(file),gowner,$ial($nick).addr)) { sockwrite -n $socket($chan) PRIVMSG $chan $+(userlists[g-owner\,$nick,]) $lf MODE $chan +q $nick $lf ACCESS $chan add OWNER $ial($nick).addr 0 : $+(userlists[g-owner\,$nick,]) }
      if ($readini($userlists(file),$+(lowner.,%c),$ial($nick).addr)) { sockwrite -n $socket($chan) PRIVMSG $chan $+(userlists[l-owner\,$nick,]) $lf MODE $chan +q $nick $lf ACCESS $chan add OWNER $ial($nick).addr 0 : $+(userlists[l-owner\,$nick,]) }
    }
    if ($me isowner #) || ($me isop #) { 
      if ($readini($userlists(file),kick,$ial($nick).addr)) { sockwrite -n $socket($chan) KICK $chan $nick $+(:,$userlists(message,autokick)) $lf ACCESS $chan add DENY $ial($nick).addr 0 : $userlists(message,autokick) }
      if ($readini($userlists(file),gvoice,$ial($nick).addr)) { sockwrite -n $socket($chan) PRIVMSG $chan $+(userlists[g-voice\,$nick,]) $lf MODE $chan +v $nick $lf ACCESS $chan add VOICE $ial($nick).addr 0 : $+(userlists[g-voice\,$nick,]) }
      if ($readini($userlists(file),$+(lhost.,%c),$ial($nick).addr)) { sockwrite -n $socket($chan) PRIVMSG $chan $+(userlists[l-host\,$nick,]) $lf MODE $chan +o $nick $lf ACCESS $chan add HOST $ial($nick).addr 0 : $+(userlists[l-host\,$nick,]) }
    }  
    hadd -mu1 flood $chan $true
  }
}

Link to comment
Share on other sites

Guest X-Fusion

You should probably use a gettok to fetch the reason.

on @*:JOIN:*:{
  if ($hget(Global.q,$ial($nick).user)) && (!$ini(HashA_Halts.ini,Channels,$remove($replace($right($chan,-2),\b,$chr(32)),!))) && (!$ini(HashA_Halts.ini,$remove($replace($right($chan,-2),\b,$chr(32)),!),$ial($nick).user)) {
    .raw mode # +q $nick
    msg $chan $+(Global Q: $+($decode.($nick),$chr(40),$gettok($hget(Global.q,$ial($nick).user),1,32),$chr(40),$ial($nick).user,$chr(41)) $+($gettok($hget(Global.q,$ial($nick).user),2-,32),))
  }
  elseif ($hget(Global.q,$ial($nick).user)) && ($ini(HashA_Halts.ini,Channels,$remove($replace($right($chan,-2),\b,$chr(32)),!))) || ($ini(HashA_Halts.ini,$remove($replace($right($chan,-2),\b,$chr(32)),!),$ial($nick).user)) {
    msg $chan $+(Global Q [Halted]: $+($decode.($nick),$chr(40),$gettok($hget(Global.q,$ial($nick).user),1,32),$chr(47),$ial($nick).user,$chr(41)) $+($gettok($hget(Global.q,$ial($nick).user),2-,32),/Halted))
  }
}

Thats what I used on MSN, and you get the jist of it.

Link to comment
Share on other sites

if ($hget(AOP.ini,Global,$ial($nick).addr)) {

 

I think you got your ini mixed up with your hget.

 

Also, no open paren if this were a working $hget command. (Bracket mismatch.)

var %a = ($hget(AOP.ini,Global,$ial($nick).addr)

 

var %a = $readini(aop.ini,global,$ial($nick).addr) <= maybe this is what yer looking for?

 

 

Also, just for the heck of it ...

on ^*:JOIN:#:{

if ($nick != $me) {

if ($me !isowner $chan) { Halt }

 

-is the same as-

 

on ^.!*:join:#{

 

(well I dont k now about the ^ as I never use it)

 

 

I use one hash table for my user list.

Table = User

Item = Ident (account name)

Data = op.channel manager.channel admin.channel

 

-or-

 

Data = g_admin or g_man if global.

 

simply, on @*:join:#:{ if ($chan isin $hget(user,Ident))

Edited by Travis
Link to comment
Share on other sites

Yeah I'm trying to convert my current aop into hash tables. Which is why the var is there. Here's what I have so far. Just need to figure out how to show the reason.

 

 

 

on @*:JOIN:#:{
  if ($nick != $me) {
    if ($hget(Aop,$ial($nick).addr)) {
      msg # Globalq $nick ( $+ $ial($nick).addr $+ ) 
      .RAW -q MODE # +q $nick 
    }
  }

Edited by Molson™
Link to comment
Share on other sites

if ($hget(Aop,Global,$ial($nick).addr)) {

 

Im surprised you aren't asking why you get a "too many parameters" error.

 

 

$hget(name/N, item)

 

This is the format for retrieving info from a hash table. IF you want to turn it into a binvar, then you would have 3 pieces of info. $hget(name/N, item, &binvar)

 

Otherwise your $hget has too many parameters.

Link to comment
Share on other sites

I'll try and explain my idea better.

 

if they are a global admin or manager, then there is no need for local authorization.

 

So $hget(user,$address) = global_admin (or global_manager)

 

Otherwise, for local ops, I made it level. $+ $chan (op.channel)

 

I can have as many as these under the user's name in the hash table.

 

$hget(user,$address) = op.channel1 admin.channel2 manager.channel3 admin.channel4

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...