Skip to content
General IRCX

Auto Op In Mirc

A TG007 community discussion started by DJ1989.

Discussion 29 posts
Page 1 of 2
Open
Topic #12941 · 29 published posts · 8,894 views

I've been looking around for an auto op script where I can have a dialog window to enter my username and password for my op account and it will auto op me when I login. I've got an auto identify system that stores my username and password, but that will not give me my operator status.

 

All the ones I've found have been of no help at all.

 

I'm testing with OfficeIRC if that helps.

 

Any help would be greatly appreciated.

 

Thanks

For an irc room? You have to find out the syntax your network uses to enter in the host or owner passwords. Entering these will give you +o or +q.

You don't need a dialog for this sort of operation. A simple on text with if-then-else statement will suffice:

on @*:TEXT:!login & &:?: {
  if ($2 === UsernameHere) && ($3 === PasswordHere) { mode #ChannelNameHere +o $nick }
  else { msg $nick Invalid login. Username and password are case sensitive. }
}

Put this script in bot's remote. Change UsernameHere, PasswordHere and #ChannelNameHere to your actual ones. After that you simply whisper your bot for an access to log in. Usage: !login UsernameHere PasswordHere

Edited Jun 12, 2009 7:38 PM by Fanfare

at the moment we have no bot...

 

normally to get oper status all we do is type /oper USER PASS and we get our access.

 

Basically, I'd want it to automatically post that info as soon as I login to the server so I can go ahead and join my channels and I'm already an op, without having to type everything.

 

Thanks

Are you talking about logging into the network with oper status?

Yeah, sorry, and I would think that would also give me my oper status in each channel on that network as well, correct?

 

Sorry for confusion.

Yes that is correct. Please show me the script you use to connect to your network server.

Right now I'm just using the default Mirc script, Just enter my server ip and pretty connect.

What you need is a connection script to your server. Without your server information and syntax it requires I cannot help you.

What connection would you recommended? I would want something simple to use. I'm sorry for all the noob questions here.

A connection would be a script that connects to your server /server. Then on connect sends your stored password and user name to auth.

So, the script I'm using now to auto identify would be considered a connection right?

 

Here is what I'm using for that.

 

[script]
n0=; ________________________________________________
n1=;|            Auto identify system                |
n2=;|                  By RG                         |
n3=;|________________________________________________|
n4=
n5=
n6=
n7=alias autoid {
n8=  if $dialog(autoid) = $null { dialog -ma autoid autoid }
n9=  else halt
n10=}
n11=dialog autoid {
n12=  title Auto identify $str($chr(160),10) {-----By RG-----}
n13=  size -1 -1 260 300
n14=  button OK,100,165 272 40 20,ok
n15=  button Cancel,200,210 272 40 20,cancel
n16=  box "",1,1 -5 258 305
n17=  text "Nick:",5,60 10 40 15 
n18=  text "Password:",6,160 10 50 15
n19=  check "",2,10 33 15 15  
n20=  edit %name1 ,3,30 30 95 20,center,autohs
n21=  edit %passw1 ,4,135 30 95 20,center
n22=  check "",7,10 53 15 15  
n23=  edit %name2 ,8,30 50 95 20,center,autohs
n24=  edit %passw2 ,9,135 50 95 20,center
n25=  check "",10,10 73 15 15  
n26=  edit %name3 ,11,30 70 95 20,center,autohs
n27=  edit %passw3 ,12,135 70 95 20,center
n28=  check "",13,10 93 15 15  
n29=  edit %name4 ,14,30 90 95 20,center,autohs
n30=  edit %passw4 ,15,135 90 95 20,center
n31=  check "",16,10 113 15 15  
n32=  edit %name5 ,17,30 110 95 20,center,autohs
n33=  edit %passw5 ,18,135 110 95 20,center
n34=  check "",19,10 133 15 15  
n35=  edit %name6 ,20,30 130 95 20,center,autohs
n36=  edit %passw6 ,21,135 130 95 20,center
n37=  check "",22,10 153 15 15  
n38=  edit %name7 ,23,30 150 95 20,center,autohs
n39=  edit %passw7 ,24,135 150 95 20,center
n40=  check "",25,10 173 15 15  
n41=  edit %name8 ,26,30 170 95 20,center,autohs
n42=  edit %passw8 ,27,135 170 95 20,center
n43=  check "",28,10 193 15 15  
n44=  edit %name9 ,29,30 190 95 20,center,autohs
n45=  edit %passw9 ,30,135 190 95 20,center
n46=  check "",31,10 213 15 15  
n47=  edit %name10 ,32,30 210 95 20,center,autohs
n48=  edit %passw10 ,33,135 210 95 20,center
n49=  text "Check to enable 'Auto Identify' for each nick'.If it's unchecked it won't do Auto Identify.",35,15 239 220 32 
n50=  button clr,36,233 32 20 16 
n51=  button clr,37,233 52 20 16
n52=  button clr,38,233 72 20 16
n53=  button clr,39,233 92 20 16
n54=  button clr,40,233 112 20 16
n55=  button clr,41,233 132 20 16
n56=  button clr,42,233 152 20 16
n57=  button clr,43,233 172 20 16
n58=  button clr,44,233 192 20 16
n59=  button clr,45,233 212 20 16
n60=  check "Allow Ayto-Id on connect",46,10 274 140 17
n61=}
n62=on *:dialog:autoid:init:*: {
n63=  if %chk1 = ON { did -c autoid  2 }  
n64=  if %chk2 = ON { did -c autoid 7 }
n65=  if %chk3 = ON { did -c autoid 10 }
n66=  if %chk4 = ON { did -c autoid 13 }
n67=  if %chk5 = ON { did -c autoid 16 }
n68=  if %chk6 = ON { did -c autoid 19 }
n69=  if %chk7 = ON { did -c autoid 22 }
n70=  if %chk8 = ON { did -c autoid 25 }
n71=  if %chk9 = ON { did -c autoid 28 }
n72=  if %chk10 = ON { did -c autoid 31 }
n73=  if %autoidcon = ON { did -c autoid 46 }
n74=}
n75=on *:dialog:autoid:sclick:100: {
n76=  if ($did(autoid,2).state = 1) { %chk1 = on } | else { %chk1 = off }
n77=  if ($did(autoid,7).state = 1) { %chk2 = on } | else { %chk2 = off }
n78=  if ($did(autoid,10).state = 1) { %chk3 = on } | else { %chk3 = off }
n79=  if ($did(autoid,13).state = 1) { %chk4 = on } | else { %chk4 = off }
n80=  if ($did(autoid,16).state = 1) { %chk5 = on } | else { %chk5 = off }
n81=  if ($did(autoid,19).state = 1) { %chk6 = on } | else { %chk6 = off }
n82=  if ($did(autoid,22).state = 1) { %chk7 = on } | else { %chk7 = off }
n83=  if ($did(autoid,25).state = 1) { %chk8 = on } | else { %chk8 = off }
n84=  if ($did(autoid,28).state = 1) { %chk9 = on } | else { %chk9 = off }
n85=  if ($did(autoid,31).state = 1) { %chk10 = on } | else { %chk10 = off }
n86=  if ($did(autoid,46).state = 1) { %autoidcon = on } | else { %autoidcon = off }  
n87=  %name1 = $did(3) | %name2 = $did(8) | %name3 = $did(11) | %name4 = $did(14) | %name5 = $did(17) | %name6 = $did(20) | %name7 = $did(23) | %name8 = $did(26) | %name9 = $did(29) | %name10 = $did(32)
n88=  %passw1 = $did(4) | %passw2 = $did(9) | %passw3 = $did(12) | %passw4 = $did(15) | %passw5 = $did(18) | %passw6 = $did(21) | %passw7 = $did(24) | %passw8 = $did(27) | %passw9 = $did(30) | %passw10 = $did(33) 
n89=} 
n90=on *:dialog:autoid:sclick:*: {
n91=  if $did = 36 { did -ru autoid 3,4,2 }
n92=  if $did = 37 { did -ru autoid 7,8,9 }
n93=  if $did = 38 { did -ru autoid 10,11,12 }
n94=  if $did = 39 { did -ru autoid 13,14,15 }
n95=  if $did = 40 { did -ru autoid 16,17,18 }
n96=  if $did = 41 { did -ru autoid 19,20,21 }
n97=  if $did = 42 { did -ru autoid 22,23,24 }
n98=  if $did = 43 { did -ru autoid 25,26,27 }
n99=  if $did = 44 { did -ru autoid 28,29,30 }
n100=  if $did = 45 { did -ru autoid 31,32,33 }
n101=}
n102=on *:NICK: {
n103=  if $nick == $me {
n104=    if ($newnick == %name1) && (%chk1 == on) { identify %passw1 }
n105=    if ($newnick == %name2) && (%chk2 == on) { identify %passw2 }
n106=    if ($newnick == %name3) && (%chk3 == on) { identify %passw3 }
n107=    if ($newnick == %name4) && (%chk4 == on) { identify %passw4 }
n108=    if ($newnick == %name5) && (%chk5 == on) { identify %passw5 }
n109=    if ($newnick == %name6) && (%chk6 == on) { identify %passw6 }
n110=    if ($newnick == %name7) && (%chk7 == on) { identify %passw7 }
n111=    if ($newnick == %name8) && (%chk8 == on) { identify %passw8 }
n112=    if ($newnick == %name9) && (%chk9 == on) { identify %passw9 }
n113=    if ($newnick == %name10) && (%chk10 == on) { identify %passw10 }
n114=  }
n115=}
n116=on *:connect: {
n117=  if (%autoidcon = on) {
n118=    if ($me = %name1) { identify %passw1 }
n119=    if ($me = %name2) { identify %passw2 }
n120=    if ($me = %name3) { identify %passw3 }
n121=    if ($me = %name4) { identify %passw4 }
n122=    if ($me = %name5) { identify %passw5 }
n123=    if ($me = %name6) { identify %passw6 }
n124=    if ($me = %name7) { identify %passw7 }
n125=    if ($me = %name8) { identify %passw8 }
n126=    if ($me = %name9) { identify %passw9 }
n127=    if ($me = %name10) { identify %passw10 }
n128=  }
n129=}
n130=menu status,channel {
n131=  -
n132=  Auto-ID:/autoid
n133=  -
n134=}
n135=on *:load: {
n136=  .echo 4 Auto Identify Sustem loaded succesfully!
n137=  .echo A new option will apear with right click in status and in channel
n138=  .echo $str($chr(160),50) By RG
n139=}

 

That allows me to store different name and password combo's to auto identify myself with, instead of doing /pass Password everytime

Interesting, I dont think tyou need all those variables but whatever.

 

Replace 'identify %passw1' with the command you need to log in as oper.

 

 

Replace every identify line.

 

 

or you can make a switch.

 

 

Here is your same code wuith all the redundant text removed and added switch to choose to login as oper.

 

menu menubar {
  $iif(%oper,$style(1)) Oper: $iif(%oper,unset,set) %oper $true
}
on *:connect:{
  if (%oper) { command to auth as oper }
  elseif (%autoidcon = on) {
    var %x = 10
    while (%x) {
      if ($me = %name [ $+ [ %x ] ]) identify %passw [ $+ [ %x ] ]
      dec %x
    }
  }
}

 

Untested of course.

Edited Jun 12, 2009 8:49 PM by Travis

Wouldn't that mess it up from auto identifying me then? If not would I just replace identify with oper?

I edited it.

hmm, I loaded the script, but can't see that it added anything anywhere. Could just be me though.

Replace your connect event with that. You should already have your accounts and passwords saved. You will need to add the command that is specific to your server to auth as oper where I stated.

I hate to say it... but you lost me someplace... :oops:

 

If I were to start with a fresh mIRC install, how would i go about this. Starting from scratch would be easiest I think, that way I don't have a bunch of un needed crap in my mIRC.

 

Sorry.

I'm sorry, you will need someone on your server who is familiar with mirc scripting.

I'm just trying to learn, we all have to start someplace. I know it can't be that hard, I just feel like I hit a brick wall.