• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Iris

Banned
Banned
Joined
Oct 20, 2006
Messages
3,245
Reaction score
1,652

Yamachi - Iris - RaGEZONE Forums


Iris is a GlobalMgrSvr Communication Library. In layman's terms, she lets you communicate with your server's GlobalMgrSvr and do things such as:
  • Obtain information about the server, including how many people are logged on. You can even see how many people are in each map.
  • Send a GM message by mail. Because this is done by directly communicating with the GMS, the GM mail appears on your users' screens immediately after sending it.
  • Broadcast a message. This message will appear at the top-center and bottom-right of all connected users' screens.
  • Disconnect all players from a channel. This is especially handy if you want to restart your server, or take it down for maintenance.

Iris is (soon-to-be) fully COM-visible, so she can be used with not only .Net languages like C# and VB.Net, but also native C++ and Autoit code (and anything else that supports COM).

To use Iris, simply reference her in your application, create an instance of the Iris.Communication class, then give it an IP and port to connect to. Here's an example in C#:

Code:
var iris = new Iris.Communication();
iris.Connect("192.168.1.2", 38170);

Simple, no? By default, Iris sends a "heartbeat" packet every 30000 milliseconds (30 seconds). You can, however, specify a custom interval. You can do so by passing the desired interval in milliseconds when you create an instance of Iris.Communication.

Code:
var iris = new Iris.Communication(5000);  // 5 seconds
...

Iris can also notify your application when certain events happen, like receiving the channel list, for example.

Code:
var iris = new Iris.Communication(5000);
iris.Events.OnReceiveServerList += new iris.EventHandler.ServerListHandler(myApp_OnReceiveServerList);
iris.Connect("192.168.1.2", 38170);
...

Iris can easily send both GM messages and broadcasts using the same method.

Code:
iris.SendMessage(6, 3, "my message");  // Broadcasts "my message" to channel 3 on server 6.
iris.SendMessage(6, 0, "msg");  // BC's "msg" to all channels on server 6.
iris.SendMessage(4, new byte[] { 2, 4, 6 }, "msg");  // BC's "msg" to channels 2, 4, and 6 on server 4.

iris.SendMessage(5, 2, "title", "message");  // Sends a GM message with the title "title", and containing the message "message" to channel 2 on server 5.

// You can use the same sort of principles with Broadcasting as GM messages to send messages to multiple/all channels.

Iris can also disconnect all players from a specified channel. This helps prevent accidental rollbacks or data loss when taking your server down for maintenance. Just disconnect everyone before you shut your server down, and you're good to go :)

Code:
iris.DisconnectPlayers(6, 2);  // Disconnects all players in channel 2 on server 6.

// You can do the same here as with Broadcasting to disconnect from multiple channels.




Time for the downloads :D
28/05/2012
* Added SetChannelType(), which allows you to change the type of any given channel without restarting it. (Thanks to Phiber)
* Added new channel types and fixed existing ones. Channel type is now a flag enum, so several types can be combined.
* Improved the speed of the code, especially when the server list is received. Structures are no longer marshalled into arrays (THIS WAS SLOW!) and I borrowed PacketBuilder and PacketReader from another (abandoned) project of mine. I will likely do some further refining later.
* Restructured a lot of the code, partially to adjust for the speed improvements.​
Binary: View attachment Iris_28-05-12_rel.rar
Source: View attachment Iris_28-05-12_src.rar

26/08/2010
* Fixed all disconnections inside Iris (Iris.Disconnect(), disconnections caused by the server, etc.).
* Changed "ServerListArgs" -> "ServerEventListArgs" (was a typo. Make sure to update this in your programs).
* Changed ServerListEventArgs.IP to show the local IP instead of the server's IP. It's much more useful this way, especially seeing as we already have the server's IP.
* Added 3 new events: OnConnect, OnDisconnect, and OnLogin. Check intellisense for more information.
* Fixed Channel.Type being set incorrectly and added Channel.IsOnline. It turns out I was using old code, and not the newest code from my personal broadcast tool :S. Anyways, the code has now been merged with Iris.
* Added <summary> tags to the enuerations.
* Maybe a few small changes. Can't remember. Nothing code-breaking.​
Binary: http://files.thedivinityproject.com/Iris_Bins_26-08-10.rar
Source: http://files.thedivinityproject.com/Iris_Source_26-08-10.rar

20/08/2010
Binary: http://files.thedivinityproject.com/Iris_Bins_20-08-10.rar
Source: http://files.thedivinityproject.com/Iris_Source_20-08-10.rar



NOTES:
  • You will need at least Visual C# 2010 Express to compile Iris.
  • All public members in Iris are accompanied by <summary> tags, so plenty of information is available via Intellisense while you code. Pay attention to the notes!
  • Iris is licensed under the GPLv3 open-source license. Please be aware that this means you may NOT use Iris in commercial products. The license also requires that any publicly-released modifications and/or derivative works (including any program making use of Iris' functionality) be licensed under GPLv3. If you are unsure about some of the implications of the GPLv3 license, please don't hesitate to ask about it here.
  • ALWAYS disconnect Iris before your application exits by calling "iris.Disconnect();". If you don't, a user slot will be taken up indefinitely in your GMS. Once all those slots are taken up, Iris will no longer be able to connect. You can remedy this by restarting your GMS.
  • I plan to add more features to Iris later on, possibly including the ability to change a channel's type on-the-fly, and start/stop/restart channels.
  • Most importantly, I WILL NOT OFFER ANY SUPPORT FOR IRIS. I have given you all plenty enough information, and more can be garnered from Intellisense and reading Iris' code. If you don't know how to program, that's not my fault. I suggest you start by picking a language, then Google some tutorials and read the language's documentation.
  • If I have forgotten to add something or made some typo's, I will fix them when I wake up. I'm knackered, and I need to sleep. Good night, RaGEZONE.
  • If you use Iris and would like to receive notifications of updates, please subscribe to this thread by using the following link: http://forum.ragezone.com/subscription.php?do=addsubscription&t=686941
  • TDP 4 presuhdentz =B







!!IMPORTANT!!
If you wish to protect your server from unauthorized access to your GMS, either change your GMS's port to something other than 38170, or restrict access to only certain safe IP's via Windows IPSec, Linux IPTables, or Linux hosts.allow/hosts.deny. If you don't do this, anyone will be able to broadcast and disconnect your players. Information on how to prevent this can be found by Google'ing.
 
Last edited:
Newbie Spellweaver
Joined
Jul 21, 2006
Messages
95
Reaction score
80
Finally something new... and really GOOD, for god sake... :D

I was looking your code and it is so clean and clear that a monkey can understand it and use it...

Thanks^^
 
┌П┐(•_•)┌П┐
Joined
Dec 22, 2009
Messages
958
Reaction score
318
its a problem,ive build ur source with succes and appear the file Iris.pdb ..,i can`t understand what to do with this,can u explain more yamachi,because some peoples from here include me don`t understading what to do with it,can u explain more detailed Yamachi?
 
Joined
Sep 11, 2008
Messages
719
Reaction score
122
its a problem,ive build ur source with succes and appear the file Iris.pdb ..,i can`t understand what to do with this,can u explain more yamachi,because some peoples from here include me don`t understading what to do with it,can u explain more detailed Yamachi?

where have you been allocen
hmn... did you learn how to code in VB ..??
cuase if you already know it you undestand the source code...
 
The Cat in the Hat
Legend
Joined
Oct 26, 2005
Messages
4,475
Reaction score
677
its a problem,ive build ur source with succes and appear the file Iris.pdb ..,i can`t understand what to do with this,can u explain more yamachi,because some peoples from here include me don`t understading what to do with it,can u explain more detailed Yamachi?

Yamachi was loud and clear that you will need some basic programming knowledge in order to make this work. No lazy support will be offered.

--Yet another fine release by The Divnity Project!--
 
Last edited:
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
81
Reaction score
27
this is really hard

i check this all not
big thx yamachi

So I'm trying to get out
but without success

that is too high for me
 
Newbie Spellweaver
Joined
Oct 15, 2008
Messages
81
Reaction score
27
@cypher
I learn

i found the release good
for Newbies of coding is this to Hard

as for me

i found this mega good work
 
Back
Top