Simple Eggdrop Connection for mIRC

Moderator: GeekShed.Net Staff

Simple Eggdrop Connection for mIRC

Postby Ford » Sun Jul 18, 2010 11:33 pm

Image
This script will allow you to connect to one or more eggdrops without the need for a telnet program or dcc chat.
Unlike most of my scripts, I'm actually interested in this one, so if you have any suggestions for improvements please post them here.

Getting Started:
  • Paste to a blank remote and save with a unique filename.
  • Right Click the channel or status and select EggDrop Connect.
  • Fill in all the boxes and click Connect.

Explanation of the input boxes:
  • IP Address = The ip address of the eggdrop
  • Port = The port the bot is listening for connections on.
  • Handle = The name the bot knows you by(not your current nick).
  • Password = The password you set with the eggdrop.
Code: Select all
;EggDrop Connect by Ford_Lawmower irc.geekshed.net #Script-Help
menu channel,status,menubar {
  .EggDrop Connect:EggDropConnect
}
dialog EggDropConnect {
  title "EggDrop Connect"
  size -1 -1 105 101
  option dbu
  text "IP Address:", 1, 4 10 37 8, right
  text "Port:", 2, 4 22 37 8, right
  text "Handle:", 3, 5 34 37 8, right
  text "Password:", 4, 5 47 37 8, right
  edit "", 5, 45 9 55 10, autohs
  edit "", 6, 45 21 55 10, autohs
  edit "", 7, 45 33 55 10, autohs
  edit "", 8, 45 46 55 10, pass autohs
  text "", 9, 4 62 97 13
  button "Connect", 10, 5 82 37 12
  button "Close", 11, 64 82 37 12, cancel
}
alias -l EggDropConnect dialog $iif($dialog(EggDropConnect),-v,-m) EggDropConnect EggDropConnect
On *:dialog:EggDropConnect:Sclick:10: {
  tokenize 32 $did($dname,5) $did($dname,6) $did($dname,7) $did($dname,8)
  if ($numtok($1-,32) < 4) {
    did -a $dname 9 Please fill in all the boxes and try again.
    .timereggcomment 1 4 did -a $dname 9   
  } 
  elseif (!$regex($1,(?:[\d]{1,3})\x2E(?:[\d]{1,3})\x2E(?:[\d]{1,3})\x2E(?:[\d]{1,3}))) {
    did -a $dname 9 IP Address must be in the form of xx.xx.xx.xx Check it and try again.
    .timereggcomment 1 4 did -a $dname 9
  }
  elseif ($2 !isnum) {
    did -a $dname 9 Port must be a number. Check it and try again.
    .timereggcomment 1 4 did -a $dname 9 
  }
  elseif ($numtok($1-,32) > 4) {
    did -a $dname 9 Unknown error in one of the fields. Please review them and try again.
    .timereggcomment 1 4 did -a $dname 9 
  } 
  else { eggconnect $1- }
}
alias eggconnect {
  var %sockname $+(EggDropConnect,$1,:,$2,-,TO,-,$3)
  if ($sock(%sockname)) sockclose %sockname
  sockopen %sockname $1 $2
  sockmark %sockname $3 $4
  if (!$window($+(@,%sockname))) { window -e $+(@,%sockname) }
  echo $+(@,%sockname) Connecting to your Eggdrop. Please Wait.......
}
on *:sockopen:EggDropConnect*: {
  if ($sockerr) {
    eggecho Socket Error Cannot Connect...
    eggecho No one seems to be listening on $mid($gettok($sockname,1,45),15-)
    eggecho Check your IP Address / Port Settings and Try Again.
    sockclose $sockname
  }
  else { sockwrite -nt $sockname $gettok($sock($sockname).mark,1,32) }
}
on *:sockread:EggDropConnect*: {
  var %eggconnect | sockread %eggconnect
  if (%eggconnect) {
    eggdispformat $+(@,$sockname) $iif($gettok($sock($sockname).mark,3,32),$+(<,$v1,>),eggconnect)  %eggconnect
    if (ÿû isin $gettok(%eggconnect,2,46)) sockwrite -nt $sockname $gettok($sock($sockname).mark,2,32)
    elseif ($regex(%eggconnect,/Connected to (.*)\x2C running eggdrop/i)) sockmark $sockname $sock($sockname).mark $regml(1)
    elseif (%eggconnect == You don't have access.) {
      eggecho eggconnect  It appears that the eggdrop doesn't know you by $+(",$gettok($sock($sockname).mark,1,32),")
      eggecho eggconnect  Please Try again with the Name that the bot knows you by.
      sockclose $sockname
    }
    elseif (Negative on that isin %eggconnect) {
      eggecho eggconnect  It appears that the password you entered is incorrect.
      eggecho eggconnect  Please try again with the correct password.
      sockclose $sockname
    }
  }
}
alias -l eggecho echo $+(@,$sockname) $1-
alias -l eggsend {
  sockwrite -nt $iif($sockname,$v1 $1-,$1-)
  echo $+(@,$iif($sockname,$v1 $me  $1-,$1 $+(<,$me,>)  $2-)) 
}
alias -l eggdispformat { echo $1-3 $replace($4-,,[04,,]) }
On *:input:@EggdropConnect*: { if ($left($1,1) != /) eggsend $gettok($active,1,64) $1- }
On *:close:@EggdropConnect*: { sockclose $mid($target,2-) }
Ford
 
Posts: 48
Joined: Wed Oct 28, 2009 1:01 am

Re: Simple Eggdrop Connection for mIRC

Postby GrimReaper » Mon Jul 19, 2010 12:36 pm

Nice Ford, I shall find this useful as I have an eggdrop on a few networks and don't want to keep waiting for PuTtY to open. :)
GrimReaper
 
Posts: 73
Joined: Wed Oct 28, 2009 4:34 pm
Location: In your router, Resetting your connection.

Re: Simple Eggdrop Connection for mIRC

Postby Ford » Mon Jul 19, 2010 3:32 pm

Let me know how it works for you GrimReaper. I haven't had a lot of feedback on this yet.
I like this a lot better than a telnet client or dccchat. The best thing about I've found is the ability to make popups to control your eggdrop. Having eggy in a mIRC @window makes it real easy to script common tasks.
Ford
 
Posts: 48
Joined: Wed Oct 28, 2009 1:01 am

Re: Simple Eggdrop Connection for mIRC

Postby therock247uk » Mon Jul 19, 2010 3:54 pm

i could never get ddc to work with eggdrops in the past always had to telnet in :s
therock247uk
 
Posts: 265
Joined: Thu Oct 22, 2009 8:29 pm
Location: uk

Re: Simple Eggdrop Connection for mIRC

Postby Ford » Mon Jul 19, 2010 7:01 pm

@therock247uk This works basically the same as telnet. If telnet works for you , this will also work fine :)
The most common problem people have with dccchat is false ip reporting from the eggy. The second most common problems with dccchat is no hostname match in the .user file. Eggy won't respond in dccchat if you don't "IDENT" when there is a change to the original hostmask.
This script avoids both issues by connecting to the eggy directly with ipaddress:port(Same as telnet) .
Ford
 
Posts: 48
Joined: Wed Oct 28, 2009 1:01 am

Re: Simple Eggdrop Connection for mIRC

Postby GrimReaper » Mon Jul 19, 2010 7:22 pm

Work's fine for me Ford, Good wat to get the detail's you need without having to search for the PuTtY Client..

I will definately be using this script.. If we could give ratings.. it would get top marks :)

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

Re: Simple Eggdrop Connection for mIRC

Postby Ford » Mon Jul 19, 2010 7:54 pm

Thanks GrimReaper :)
I'm glad you like it.
Ford
 
Posts: 48
Joined: Wed Oct 28, 2009 1:01 am


Return to Script help

Who is online

Users browsing this forum: No registered users and 4 guests

cron