[repo][listener] look for changes on startup

This commit is contained in:
Hylke Bons 2010-09-12 18:15:24 +01:00
parent 0ee0fd605b
commit 592adadd5d
2 changed files with 17 additions and 9 deletions

View file

@ -39,6 +39,9 @@ namespace SparkleLib {
Nick = nick.Replace ("@", "_at_").Replace (".", "_dot_");
Port = 6667;
if (Nick.Length > 9)
Nick = Nick.Substring (0, 9);
// TODO: Remove these hardcoded values
Channel = "#sparkletest";
Server = "irc.gnome.org";
@ -58,18 +61,22 @@ namespace SparkleLib {
try {
// Connect to the server
Client.Connect (new string [] {Server}, Port);
// Login to the server
Client.Login (Nick, Nick);
// Join the channel
Client.RfcJoin (Channel);
Thread thread = new Thread (
new ThreadStart (delegate {
// Connect to the server
Client.Connect (new string [] {Server}, Port);
// Login to the server
Client.Login (Nick, Nick);
// Join the channel
Client.RfcJoin (Channel);
Client.Listen ();
Client.Disconnect ();
})
);

View file

@ -212,6 +212,7 @@ namespace SparkleLib {
LocalTimer.Start ();
CheckForRemoteChanges ();
// Add everything that changed
// since SparkleShare was stopped