Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: ManSoft|Warlord on June 06, 2007, 01:51:03 pm

Title: IRC-Class ver. 0.3a
Post by: ManSoft|Warlord on June 06, 2007, 01:51:03 pm
Script Name: IRC-Class
Script Description: With this unit it is possible to get your Soldatserver connected to any IRC-Server
Original Author(s): Warlord
Used Code(s): SocketExample by Enesce, XSplit (renamed) from KeYDoN
Core Version: 2.6.3 (tested with)
Script Version: 0.3a
Attached files: irc.zip

The idea: Why shouldn’t we use the Socket-usability for connecting to IRC-Servers? After working through the IRC-RFC and after testing a little bit with telnet-connections to the Quakenet it was nearly done: My first IRC-Unit. After testing a while and adding some procedures to make it more comfortably to use it, it was very done in a very short time.

Edit: I added some really nice features like irc_color(), irc_get_nicks() or irc_set_topic(). You can also choose the style of everything which should be said by using irc_style(). So you can change the style to bold, underlined or inverted. But you can check this later.

New features in 0.3a (2008/01/11):

# added multi-channel-trigger (two channels at the moment) support
# added default-color-message if a player joins server
# added command: player_say_to_irc(Channel, ID, msg): This command auto-formats
    the message from the player to the IRC-Channel.
# added some default-messages for flag-grab, -return, -score
# fixed some bugs


2007/12/02: Version 0.3 released
# beta-reconnect
# new kind of file-sort
# fixed some bugs
# zipped all files
CHECK example.pas for further information / tutorial / example


Well I talked enough I think. So get the unit here:
On Soldatnet.com! (http://web0.res0.45188.vs.webtropia.com/soldatnet/?p=11)
There is also a mini-tutorial :)
or here:
Title: Re: IRC-Class ver. 0.1
Post by: sorny on June 06, 2007, 03:11:59 pm
bah, too nice warlord ;D

i'm going to test it right now, gj though =D
Title: Re: IRC-Class ver. 0.1
Post by: EnEsCe on June 06, 2007, 09:35:58 pm
Please read the post template dude... Post the code here.
Title: Re: IRC-Class ver. 0.1
Post by: ManSoft|Warlord on June 07, 2007, 01:50:56 am
I attached it :)
Title: Re: IRC-Class ver. 0.1
Post by: EnEsCe on June 07, 2007, 02:02:30 am
You still havent followed the post template, like every other topic. Dont make the forum look like trash
Title: Re: IRC-Class ver. 0.1
Post by: Laser Guy on June 07, 2007, 02:13:56 am
EnEsCe... r u always a rules guy?
Title: Re: IRC-Class ver. 0.1
Post by: Toumaz on June 07, 2007, 07:10:31 am
Nice work, a pretty versatile script you got there.

The only downside is that you're limited to 3 or 5 connections per hostname on most IRC servers, so the script can't really be used to any large extent (at least; if the servers are running on a single IP). But it's not one could blame that on the script itself, so anyhow. Good job.
Title: Re: IRC-Class ver. 0.1
Post by: ManSoft|Warlord on June 07, 2007, 12:00:17 pm
I wrote on soldatnet.com that you should connect through an BNC/IRC-Proxy so you can connect to the IRC, although you can only have 3 to 5 connections at one time :>
Title: Re: IRC-Class ver. 0.1
Post by: urraka on June 07, 2007, 01:25:25 pm
Hey, i took a look at that script, seems cool. I haven't tested it yet, but am i able to know the nickname of whoever chats on the irc channel from the server script?
Title: Re: IRC-Class ver. 0.1
Post by: ManSoft|Warlord on June 07, 2007, 01:50:53 pm
not yet - i will implement it within the nex days :)
Title: Re: IRC-Class ver. 0.1
Post by: urraka on June 07, 2007, 08:32:51 pm
Alright, now i have tested the script, and i also manage to get the nickname i wanted from the IRC channel. The script is well coded i think, but it seems that when some data is transfered from server to irc, or from irc to server, the soldat server stops working, it just says "connection problem" and then everything goes to ****.
Anyway, i managed to do what i wanted a simplier way with ARSSE, but it seems i can't get the IRC nickname with that =/.
Title: Re: IRC-Class ver. 0.2
Post by: ManSoft|Warlord on June 08, 2007, 03:49:10 am
UPDATE

Date Posted: June 08, 2007, 04:20:49 AM
Hm I see that you have to call irc_get_nicks() two times until you get the new users :(. will be fixed in the next release
Title: Re: IRC-Class ver. 0.2
Post by: BombSki on November 30, 2007, 09:05:48 pm
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 
07-12-01 03:04:13 Shutting down server...
07-12-01 03:04:13 Shutting down admin server...
07-12-01 03:04:13 Shutting down ScriptCore...

any ideas?
Title: Re: IRC-Class ver. 0.2
Post by: urraka on November 30, 2007, 10:22:37 pm
Include Irc.pas before Core.pas
Title: Re: IRC-Class ver. 0.2
Post by: BombSki on December 01, 2007, 10:08:31 am
thanks, that worked. im wondering if anyone else is using it and maybe has developed it further? its nice as it is but for example when it times out it doesnt reconnect, and for some reason i cant get irc->server commands working. if anyone is using this with some more/advanced commands and would like to share it id be grateful.
Title: Re: IRC-Class ver. 0.2
Post by: ManSoft|Warlord on December 02, 2007, 06:02:27 am
Well... Do you have ICQ? If so - add me to your icq-list so we could fix the bugs :)

€dit: And add some nice features :)
Title: Re: IRC-Class ver. 0.2
Post by: BombSki on December 02, 2007, 08:16:43 am
nope, no ICQ.. maybe youve got IRC? :P
/whois BombSki`
Title: Re: IRC-Class ver. 0.3a
Post by: ManSoft|Warlord on January 11, 2008, 04:46:18 pm
Version 0.3 released

Date Posted: December 03, 2007, 02:57:54 pm
Version 0.3a released
Title: Re: IRC-Class ver. 0.3a
Post by: DorkeyDear on January 11, 2008, 08:19:45 pm
Changelog?
Title: Re: IRC-Class ver. 0.3a
Post by: ManSoft|Warlord on January 12, 2008, 06:54:53 am
1st post...
Title: Re: IRC-Class ver. 0.3a
Post by: VenTeR on March 28, 2008, 07:08:09 am
[Error] irc -> (ThreadedCreate) : Out of Range
why?
Title: Re: IRC-Class ver. 0.3a
Post by: pebe on August 28, 2008, 01:32:35 am
IRC: Disconnected - try to reconnect...
IRC: Try to establish IRC-Connection...
[Error] CreateSocket: Function Disabled (SafeMode = ON)


wtf ?
Title: Re: IRC-Class ver. 0.3a
Post by: EnEsCe on August 28, 2008, 02:18:08 am
You have to disable Safe Mode to use Socket functions. Start the server with "-safe 0"
Title: Re: IRC-Class ver. 0.3a
Post by: pebe on August 28, 2008, 02:26:34 am
ye i know but i dont know wher i must change it ... ^^
Title: Re: IRC-Class ver. 0.3a
Post by: iDante on August 28, 2008, 02:59:23 am
If you're on windows then create a batch file with this in it:
Code: [Select]
soldatserver.exe -safe 0
put that in your soldatserver directory and run it.