This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Connect as serverr

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Connect as serverr

Post by r0t3n »

Can someone write a little piece of code which will connect the eggdrop to a irc server as a server and not a user, through port 4400. I need this for my irc service script, but i have no clue how to connect the eggdrop as a server and not as a user.

Thanks in advance!
r0t3n @ #r0t3n @ Quakenet
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

this is an excerpt from my IRC server emulator ircd.tcl

Code: Select all

proc introduce_server {host port password} {
	variable connected
	variable idx; variable myname
	if ![valididx $idx] return
	set connected 1; variable gotpong 0
	log "connected to $host:$port, introducing myself..."
	switch $::ircd::servtype {
		"hybrid6" {putdcc $idx "PASS $password :TS"}
		"hybrid7" {putdcc $idx "PASS $password :TS"; putdcc $idx "CAPAB :LL"}
		"unreal"  {putdcc $idx "PASS :$password"; putdcc $idx "PROTOCTL SJOIN"}
		default {
			log "invalid ircd(servtype)! bailing out..."
			set connected 0; killdcc $idx
			return
		}
	}
	putdcc $idx "SERVER $myname 1 :$::ircd::servinfo"
	putdcc $idx "PING :$myname"
}
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Why would you even want to use eggdrop to do that.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

to create an IRC network out of channels on other network
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

I was asking tosser why he wants to use eggdrop to make an IRC Service bot (not an IRCd). I'd use just normal TCL.

(Also, eggdrop cannot connect as server, you can only use a script to create a socket to do it, unless you modify the entire eggdrop source to work differently.)
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

demond: that code is to connect eggdrop as an ircd, i want the eggdrop to connect as a server, not as an ircd, but as an irc service, not a ircd, a client connected as a server (if you get what i mean).
r0t3n @ #r0t3n @ Quakenet
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

tosser: you are completely clueless on the subject, either give up on it or go learn the IRC server protocol; you don't even know what ircd is, let alone how a service relates to it

to be honest, I've never seen someone else trying to come up with something knowing absolutely nothing about it - not in eggdrop scripting, not in any other area
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

I know exactly what you mean. I have even written some asuka (ircu) compatible 'services' in TCL (no eggdrop attached, like i said, no idea why you would want that)

Tosser should do his homework first, a client can't connect as a server as it has to go through the server introduction first.
Post Reply