Page 1 of 1

Where on _earth_ is the linking code?

Posted: Thu Apr 19, 2007 9:05 pm
by john
Where is the linking code? I am looking into coding a "semi-server" to link to my net to perform certain U:line duties, so I need to figure out the link protocol--a link to the link docs (;)) or a finger in the direction of the correct file would be nice.

Thanks!
--DC

Posted: Fri Apr 20, 2007 3:04 pm
by JanisB
/path-to-unreal/doc/technical/serverprotocol.html
/path-to-unreal/doc/technical/protoctl.txt

Posted: Fri Apr 20, 2007 6:45 pm
by john
/me slaps head and yells out "DUMB***"... I'm stupid.

Thanks.

-_-

Posted: Sat Apr 21, 2007 3:13 am
by john
Do I have to send a USER server->server for a "client" i create?
And also, what is servicestamp in the NICK command?

Posted: Sat Apr 21, 2007 9:31 am
by Jobe
John, in particular read the serverprotocol.html file which documents in detail exactly how to introduce a user.

Posted: Sat Apr 21, 2007 5:01 pm
by john
I did/am. It does not detail what the servicestamp is.

OK:
:XXX.XXX ES
Then I have the script register the user with a nick, and:
12:44:30p-} -XXX.XXX- *** Global -- Lost user field for LifeSux in change from KimS.Cibilian.Org[199.247.229.113]
and
:XXX.XXX KILL LifeSux :jack.cibilian.org (Lost user field!)

Code: Select all

&establishLink();
while (<$sock>) {
        print;
        last if /^:XXX.XXX ES/;
}
$time = `date -j -f "%a %b %d %T %Z %Y" "\`date\`" "+%s"`;
print $sock "& LifeSux 1 $time kims $servername $servername 0 :KimS Bot\n";
i.e it connects, makes a link, waits for the server to give ES, gets the timestamp, and registers the user.

Posted: Tue May 08, 2007 12:03 pm
by IronLegend
john wrote:

Code: Select all

&establishLink();
while (<$sock>) {
        print;
        last if /^:XXX.XXX ES/;
}
$time = `date -j -f "%a %b %d %T %Z %Y" "\`date\`" "+%s"`;
print $sock "& LifeSux 1 $time kims $servername $servername 0 :KimS Bot\n";
i.e it connects, makes a link, waits for the server to give ES, gets the timestamp, and registers the user.
for $time you should use the seconds passed since midnight 1 januari 1970.

Im currently working on a somewhat the same project. here is my user create code:

Code: Select all

Send( "& SweNed 666 200000 service services.swened.com services.swened.com 0 +Sqvtr services.swened.com * :Type /msg SweNed HELP for help" );
I use 200000 as time since every other client that is named SweNed will be disconnected automaticaly.
tec doc:
/path-to-unreal/doc/technical/serverprotocol.html#S3_1

Posted: Wed May 09, 2007 11:51 pm
by john
IronLegend: I have to use a real timestamp as the time value for intro'ing the user; otherwise it gives the same error.

Posted: Fri May 11, 2007 11:52 am
by Jobe
Anope uses the following format:

Code: Select all

NICK NickServ 1 1178884110 services invictachat.net services.invictachat.net 0 +oS invictachat.net * :InvictaChat: Nickname Server
As far as I know a timestamp of 0 or 1 should work.