Tag Archive
arctic arctic monkeys bot clever cure def f# f-sharp framework fsharp functions guitar guitar tabs infection install intelligent irc irc bot ircbot Linux lyrics malware monkeys network notes oop pcquad php Python quotes sheets simple social social network socialnetwork song source code string tabs too much to ask tutorial ubuntu variables without tools zend
F# Irc bot
Heyho in the past i created a little irc bot,
its my first F# application and i pretty like it:
'its a simple IRC Bot written in F#.
#light
open System.Net.Sockets
open System.IO
open System
open System.Text.RegularExpressions
//Opens any needed namespaces
let tcp = new TcpClient();
tcp.Connect("irc.afterworkchat.net",6667)
//Connects and creates streams for the connection.
let reader = new StreamReader(tcp.GetStream())
let writer = new StreamWriter(tcp.GetStream())
writer.WriteLine("USER FSharpBot FSharpBot FSharpBot FSharpBot")
writer.AutoFlush < - true
writer.WriteLine("NICK FSharpBot")
//Log in and create a loop that will keep the bot open.
while(reader.EndOfStream = false) do
let line = reader.ReadLine()
Console.WriteLine(line)
//msg is what someone said without the raw irc code.
let msg = line.Substring(line.Substring(1).IndexOf(":") + 2)
//Console.WriteLine(msg))
if (line.Contains("PING")) then
writer.WriteLine("PONG :irc.afterworkchat.net")
thats it
PHP Developing
Well , back 2010 i developed on many projects covering the php language , for example
http://pcquad.de/cmd , my more or less experimental Social network consisting of things like a Board, A Chat, registration and login form and so on…
Then there was my attempt to program a CMS framework , which worked fine
the special on that project is that it doesnt use and SQL software , just plain text files
http://pcquad.de/index.php?page=Thread&postID=226#post226
Also its programmed fully in OOS and in the style of the Zend framework
Then there is the source code of my intelligent IRC bot
look at http://pcquad.de/index.php?page=Thread&threadID=59