working with downloaders

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Shambler[sixpack]

New Member
May 3, 2001
564
0
0
Ireland
Visit site
I'll look into the name thing (shouldn't be hard because I'm quite sure I can parse the connections URL, which includes the ?Name= pointer), first things first tho..We gotta see if that thing works.

Now, I assume Rune comes with a program in the system folder called UCC right? Well you should ALWAYS use that to compile things and not the editor because the editor gives you messed up packages :)

This is how to use ucc: http://wiki.beyondunreal.com/wiki/Compiling_With_UCC

The problem with the class header you have there is that you have an extra ;, it should be like this:
Code:
Class DownloadNotify extends Actor// you had an ; here, which is wrong
	native;

To make this execute you will have to change the code in DownloadNotify and run it as a ServerActor (in Rune.ini find ServerActor= and add a new one under it called ServerActor=DownloadNotify.DownloadNotify)

Then change the code to get it to work. (or you can leave the code as it is to see if it loads and executes the test code properly)

EDIT: You shouldn't put it under mutator, leave the classname as is or the dll will not link with it :)
 
Last edited by a moderator:

BongoBoy

New Member
May 28, 2004
30
0
0
oh... well i tested now in the way i said(without native in start, under mutators, compiled in editor) so mabye its the reason of some of the problems i had... but anyway here is what i got:

this is the code i used:
Code:
// Created by Shambler (Shambler@OldUnreal.com)
class DownloadNotify expands Mutator;

var string LastIP;

native final function DisconnectIP(string IP);
native final function UpdateDownloadInfo(optional string IP);
event NewConnection(string IP)
{
	LastIP = IP;
	Log("DownloadNotify::NewConnection:"@IP, 'DownloadNotify');
	broadcastmessage("NewConnection - "@IP);
	// Code I was using to test this class
	SetTimer(0.1, True);
}
event bool SendingFile(string IP, string GUID, int TotalSize, int DownloadedSize)
{
	Log("DownloadNotify::SendingFile:"@IP@GUID@TotalSize@DownloadedSize, 'DownloadNotify');
	broadcastmessage("DownloadNotify::SendingFile:"@IP@GUID@TotalSize@DownloadedSize);
	return True;
}
function Timer()
{
	UpdateDownloadInfo();
}
function Mutate(string MutateString, PlayerPawn Sender)
{
	Super.Mutate(MutateString, Sender);
	if (MutateString~="a")
		DisconnectIP(LastIP);
}

it did show me all the SendingFile info.
when the person connected, it didn't show me the IP num.
when i did "mutate a" when someone was downloading, sometimes it worked perferctly and sometimes it crash giving me this message:
http://img.photobucket.com/albums/v151/BongoBoy/eed2bb75.jpg
(TVRagnar is a player class in the mod i used, TV, so people will download. TV-AcidChamber is the map's name)

i will try again though with the directions you gave me mabye it will solve those problems :)
 
Last edited:

BongoBoy

New Member
May 28, 2004
30
0
0
no, still same problems :(

I don't see the IP of the player that joins
and it seem to crash after the i use the DisconnectIP once... i mean every time i use it after i already disconnected someone - it crash(doesn't matter if someone is downloading or not, aslong as i do "mutate a")
show me this after crash
http://img.photobucket.com/albums/v151/BongoBoy/eed2bb75.jpg

the code of downloadnotify:
Code:
class DownloadNotify expands Actor
	native;

var string LastIP;

native final function DisconnectIP(string IP);
native final function UpdateDownloadInfo(optional string IP);
event NewConnection(string IP)
{
	Log("DownloadNotify::NewConnection:"@IP, 'DownloadNotify');
	broadcastmessage("DownloadNotify::NewConnection:"$IP);
	LastIP = IP;
}
event bool SendingFile(string IP, string GUID, int TotalSize, int DownloadedSize)
{
	Log("DownloadNotify::SendingFile:"@IP@GUID@TotalSize@DownloadedSize, 'DownloadNotify');
	broadcastmessage("DownloadNotify::SendingFile:"@IP@GUID@TotalSize@DownloadedSize);

	return True;
}

function Tick(float deltatime)
{
	Super.Tick(deltatime);
	UpdateDownloadInfo();
}

the code of the mutator:
Code:
class DisMut expands Mutator;

function Mutate(string MutateString, PlayerPawn Sender)
{
	local DownloadNotify DF;
	
	Super.Mutate(MutateString, Sender);
	if (MutateString~="a")
	{
		foreach allactors(class'DownloadNotify',DF)
		{
			DF.DisconnectIP(DF.LastIP);
			break;
		}
	}
}

all my rune.log file if you want(i took out all the SendingFile logs since it was a lot and only left the first one and the last)
Code:
ScriptLog: Login: Bongo
Log: Possessed PlayerPawn: TVRagnar TV-AcidChamber.TVRagnar0
Init: Initialized moving brush tracker for Level TV-AcidChamber.MyLevel
DevAudio: Galaxy SetViewport: WindowsViewport0
DevNet: NotifyAcceptingConnection: Server MyLevel accept
DownloadNotify: DownloadNotify::NewConnection: 
Log: Resolved master.gamespy.com (207.38.8.34)
ScriptLog: UdpServerUplink: Master Server is master.gamespy.com:27900
ScriptLog: UdpServerUplink: Port 7779 successfully bound.
DevNet: Level server received: HELLO REVISION=0 MINVER=106 VER=107
Log: D3D Driver: Preloaded 0K/44694K (1)
DevNet: Level server received: NETSPEED 2600
Log: Client netspeed is 2600
DevNet: Level server received: LOGIN RESPONSE=1825710215 URL=Index.run?Name=Zodiak(ScrtLbs)?Class=RuneI.RagnarSnow?team=255?skin=0?Face=?Checksum=NoChecksum
DevNet: Login request: Index.run?Name=Zodiak(ScrtLbs)?Class=RuneI.RagnarSnow?team=255?skin=0?Face=?Checksum=NoChecksum
DownloadNotify: DownloadNotify::SendingFile:  E2E9F5574D05FE9658DA12A64F441459 -1 -1
DevNet: Sending '..\System\TV.u'
DownloadNotify: DownloadNotify::SendingFile:  ..\System\TV.u 1616334 0
DownloadNotify: DownloadNotify::SendingFile:  ..\System\TV.u 1616334 0
NetComeGo: Close TcpipConnection0 11/21/04 03:10:18
DevNet: NotifyAcceptingConnection: Server MyLevel accept
DownloadNotify: DownloadNotify::NewConnection: 
DevNet: Connection timed out after 15.000000 seconds (15.001646)
NetComeGo: Close TcpipConnection1 11/21/04 03:10:33
DevNet: NotifyAcceptingConnection: Server MyLevel accept
DownloadNotify: DownloadNotify::NewConnection: 
DevNet: Level server received: HELLO REVISION=0 MINVER=106 VER=107
DevNet: Level server received: NETSPEED 2600
Log: Client netspeed is 2600
DevNet: Level server received: LOGIN RESPONSE=-709742940 URL=Index.run?Name=bob?Class=RuneI.RagnarSnow?team=255?skin=0?Face=?Checksum=NoChecksum
DevNet: Login request: Index.run?Name=bob?Class=RuneI.RagnarSnow?team=255?skin=0?Face=?Checksum=NoChecksum
DownloadNotify: DownloadNotify::SendingFile:  E2E9F5574D05FE9658DA12A64F441459 -1 -1
DevNet: Sending '..\System\TV.u'
DownloadNotify: DownloadNotify::SendingFile:  ..\System\TV.u 1616334 0
DownloadNotify: DownloadNotify::SendingFile:  ..\System\TV.u 1616334 7013
NetComeGo: Close TcpipConnection2 11/21/04 03:11:14
NetComeGo: Close TcpipConnection0 11/21/04 03:11:14
Critical: appError called:
Critical: Assertion failed: Driver->ClientConnections.RemoveItem( this )==1 [File:D:\Rune\Engine\Src\UnConn.cpp] [Line: 93]
Critical: Windows GetLastError: The operation completed successfully. (0)
Exit: Executing UObject::StaticShutdownAfterError
Exit: Executing UWindowsClient::ShutdownAfterError
Exit: UGalaxyAudioSubsystem::ShutdownAfterError
Exit: UD3DRenderDevice::ShutdownAfterError
Critical: UNetConnection::Destroy
Critical: ADownloadNotify::execDisconnectIP
Critical: UObject::ProcessEvent
Critical: (TVRagnar TV-AcidChamber.TVRagnar0, Function Engine.PlayerPawn.Mutate)
Critical: UObject::ScriptConsoleExec
Critical: (TVRagnar TV-AcidChamber.TVRagnar0)
Critical: UPlayer::Exec
Critical: UViewport::Exec
Critical: UWindowsViewport::Exec
Critical: UObject::ProcessEvent
Critical: (RuneConsole Transient.RuneConsole0, Function Engine.Console.Typing.KeyEvent)
Critical: UEngine::InputEvent
Critical: UWindowsViewport::CauseInputEvent
Critical: WM_KEYDOWN
Critical: UWindowsViewport::ViewportWndProc
Critical: WWindow::StaticProc
Critical: DispatchMessage
Critical: 00310148 256
Critical: MessagePump
Critical: MainLoop
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 11/21/04 03:11:25

any idea?
 

Shambler[sixpack]

New Member
May 3, 2001
564
0
0
Ireland
Visit site
Ok I'll look into that, I'm not 100% sure why it isn't giving the IP address but I think I have an idea of what may be causing that...As for the disconnection code, I mustn't be doing it the right way so I'll try get some info off someone with access to the full source.

Right now tho I have to go to bed :) l8r.
 

Shambler[sixpack]

New Member
May 3, 2001
564
0
0
Ireland
Visit site
Ok I've made up a new .dll but the changes are minimal, the NewConnection event 'should' give some information for the IP and it should look something like the information you get from the sockets command. (an unparsed line)
If it doesn't give information for the IP I'm really not sure what might be happening there, I'd probably need to test it myself using Rune.

As for DisconnectIP, you will have to manually specify an IP for that and the chances are it will still give you a GPF however I've added some extra code so it doesn't try to kill invalid connections.....I've sent someone with access to the full source a message so he can hopefully find out and tell me how to do it properly :)

The UScript side of the code is unchanged, I'll add something to retrieve the players incoming name once the IP problem has been sorted :)

http://homepage.eircom.net/~JBarrett847/DLNotify2.zip
 
Last edited by a moderator:

BongoBoy

New Member
May 28, 2004
30
0
0
well the IP in start seem to work :)

but Disconnect doesn't work anymore :(

its always something ha? :rolleyes:
 

Shambler[sixpack]

New Member
May 3, 2001
564
0
0
Ireland
Visit site
I was busy yesterday so couldn't visit here, give me the information from the NewConnection logs because I want to see if it's returning the actual IP in Rune or the full channel information :)

That should help me in trying to fix the DisconnectIP function. (I got help from Usaar33 with figuring out how that works, he was able to look up the conventional disconnecting code)