mIRC Autojoin Dialog

Moderator: GeekShed.Net Staff

mIRC Autojoin Dialog

Postby GrimReaper » Thu May 27, 2010 5:10 pm

Code: Select all
menu * {
  mIRC Autojoin:mircajoin
}

dialog mirc_ajoin {
  title "mIRC Autojoin/Auto Identify by GrimReaper"
  size -1 -1 200 86
  option dbu
  combo 1, 5 10 60 60, sort size
  text "Network Select:", 4, 5 1 38 8
  text "Channel Select:", 5, 67 1 38 8
  combo 6, 67 10 60 60, sort size
  button "Add", 7, 129 10 30 12
  button "Delete", 8, 165 10 30 12
  button "Refresh", 9, 129 26 30 12
  button "Clear Ajoin", 10, 165 26 30 12
  button "Ok", 11, 129 42 30 12, ok
  button "Save Pass", 12, 165 42 30 12
  text "Note: Clear Ajoin will clear", 13, 129 56 63 8
  text "all channels for that Network.", 14, 129 63 71 8
  text "NickServ Password:", 15, 5 73 48 8
  edit "", 16, 58 72 135 10, pass autohs
  menu "File", 2
  item "Exit", 3, 2, cancel
}

on *:DIALOG:mirc_ajoin:init:*: {
  var %majn = 1
  while (%majn <= $scon(0)) {
    did -a $dname 1 $scon(%majn).network
    inc %majn
  }
}

on *:DIALOG:mirc_ajoin:sclick:*: {
  if ($did == 1) {
    if (%Autojoin. [ $+ [ $did($dname,1).text ] ] == $null) {
      did -r $dname 6
      did -a $dname 6 No current Ajoin.
    }
    else {
      did -r $dname 6
      didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
      did -c $dname 6 1
    }
  }
  if ($did == 7) {
    if ($did($dname,6).text == $null) { noop $input(Please enter a channel to add to Autojoin.,uwo,Error!) }
    else {
      var %majnnet = $did($dname,1).text
      var %majnchan = $did($dname,6).text
      if ($+(*,%majnchan,*) !iswm %Autojoin. [ $+ [ %majnnet ] ]) { set $+(%,Autojoin.,%majnnet) $addtok(%Autojoin. [ $+ [ %majnnet ] ],%majnchan,44) }
      elseif ($+(*,%majnchan,*) iswm %Autojoin. [ $+ [ %majnnet ] ]) { noop $input(That channel is already in the Autojoin.,uwo,Error!) }
      did -r $dname 6
      didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
      did -c $dname 6 $did($dname,6).lines
    }
  }
  if ($did == 8) {
    if ($did($dname,6).text == $null) { noop $input(Please enter a channel to del from Autojoin.,uwo,Error!) }
    else {
      var %majnnet = $did($dname,1).seltext
      var %majnchan = $did($dname,6)seltext
      if (* $+ %majnchan $+ * iswm %Autojoin. [ $+ [ %majnnet ] ]) { set $+(%,Autojoin.,%majnnet) $remtok(%Autojoin. [ $+ [ %majnnet ] ],%majnchan,1,44) }
      elseif ($+(*,%majnchan,*) !iswm %Autojoin. [ $+ [ %majnnet ] ]) { noop $input(That channel is not in your Autojoin.,uwo,Error!) }
      did -r $dname 6
      didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).seltext ] ]
      did -c $dname 6 $did($dname,6).lines
    }
  }
  if ($did == 9) {
    if (%Autojoin. [ $+ [ $did($dname,1).text ] ] == $null) {
      did -r $dname 6
      did -a $dname 6 No current Ajoin.
    }
    else {
      did -r $dname 6
      didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
      did -c $dname 6 1
    }
  }
  if ($did == 10) {
    var %majnnet = $did($dname,1).text
    unset %Autojoin. [ $+ [ %majnnet ] ]
    did -r $dname 6
    did -a $dname 6 No current Ajoin.
  }
  if ($did == 12) {
    if (!$did($dname,16).text) { noop $input(Please enter your NickServ Password:,uwo,Error!) }
    else {
      set %Autoident. [ $+ [ $did($dname,1).text ] ] $encode($did($dname,16).text,m)
    }
  }
}

on *:NOTICE:*nickname is registered and protected*:?:{ if ($nick == NickServ) && (%Autoident. [ $+ [ $network ] ] != $null) { .msg NickServ identify $decode(%Autoident. [ $+ [ $network ] ],m) } }

on *:NOTICE:*Password accepted*:?:{ if ($nick == NickServ) { join %AutoJoin. [ $+ [ $network ] ] } }

alias -l mircajoin {
  if (!$dialog(mirc_ajoin)) { dialog -m mirc_ajoin mirc_ajoin }
  else { noop $input(The Autojoin Dialog is already opened.,uwo,Error!) }
}


Basic right click popup for Status, channel, menubar, query and nicklist will open the Dialog box.

Image

Updated to use $addtok and $remtok, Idea's from one of my mates :)

Updated again: Told the "Cancel" button didn't work, so added a $did event to close the dialog.

Updated once more.. It now includes an AutoIdentify section, Although you will need to enable/uncheck the decode box in the "mIRC Options < Lock" tab.

Updated again: I have added an AutoIdentify feature to this script. I have tested it and it works.
Last edited by GrimReaper on Fri Jun 04, 2010 3:13 pm, edited 5 times in total.
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: mIRC Autojoin Dialog

Postby therock247uk » Fri May 28, 2010 12:06 am

/me likes
therock247uk
 
Posts: 265
Joined: Thu Oct 22, 2009 8:29 pm
Location: uk

Re: mIRC Autojoin Dialog

Postby GrimReaper » Sat Jun 05, 2010 9:34 pm

I will be editing it again soon to implement IRC network's for your choosing, not one's that you are currently on.

I will be also trying to implement way's of adding IRC server's to the dialog, then automatically joining the network's in question.

I have a way in my mind of doing so. It's just implementing it.

I'll keep you up too date on progress.

Many thanks,

GrimReaper
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: mIRC Autojoin Dialog

Postby Anell » Fri Jun 18, 2010 6:29 am

Nice Script :D
Anell (KevinTimes)

Image
Anell
 
Posts: 19
Joined: Wed Mar 31, 2010 9:50 pm
Location: London, UK


Return to Script help

Who is online

Users browsing this forum: No registered users and 9 guests

cron