Update the printing format based on ##Proggit feedback, now printing ups and the direct reddit link

This commit is contained in:
R. Tyler Ballance 2009-09-14 02:33:23 -07:00
parent cca0889d18
commit 9fd938917c
3 changed files with 16 additions and 3 deletions

View File

@ -134,6 +134,18 @@ namespace Proggitbot
set { this.id = value; }
}
public Int64 Ups
{
get { return this.ups; }
set { this.ups = value; }
}
public Int64 Downs
{
get { return this.downs; }
set { this.downs = value; }
}
public string Domain
{
get { return this.domain; }

View File

@ -51,9 +51,8 @@ namespace Proggitbot
foreach (EntryData entry in entries)
{
irc.SendMessage(SendType.Notice, channel,
String.Format("{0} ({1}) {2} {3}", entry.Title, entry.Author,
entry.Url,
irc.SendMessage(SendType.Message, channel,
String.Format("[+{0}/-{1}] {2} {3}", entry.Ups, entry.Downs, entry.Title,
String.Format("http://reddit.com/comments/{0}", entry.Id)
));
}

View File

@ -32,6 +32,8 @@ namespace Proggitbot.Tests
Assert.AreEqual("scientologist2", data.Author, "Author mismatch");
Assert.AreEqual("ted.com", data.Domain, "Domain mismatch");
Assert.AreEqual("9k30b", data.Id, "ID mismatch");
Assert.AreEqual(450, data.Ups, "Ups mismatch");
Assert.AreEqual(97, data.Downs, "Downs mismatch");
}
[Test]