2 /* Circ.Lib : main library behind Circ
3 * Copyright (C) 2007 LAVAL Jérémie
5 * This file is licensed under the terms of the LGPL.
7 * For the complete licence see the file COPYING.
13 /* Tapioca IRC reference :
16 fullname : telepathy-idle user http://telepathy.freedesktop.org
20 quit-message : So long and thanks for all the IRC - telepathy-idle IRC Connection Manager for Telepathy - http://telepathy.freedesktop.org
24 namespace Circ
.Backend
27 /// This struct store all the information needed by IrcConnection
29 /// <remarks>If the password is null or empty, it is ignored</remarks>
30 public class ConnectionInfo
32 readonly string server
;
34 readonly string password
;
35 readonly string realName
;
45 /// Initalize a new instance of ConnectionInfo
47 /// <param name="server">The hostname of the server</param>
48 /// <param name="port">The port of the server</param>
49 /// <param name="pseudo">The pseudonyme of the user</param>
50 /// <param name="pass">The password for the server</param>
51 /// <param name="realName">The real name of the irc user</param>
52 public ConnectionInfo(string server
, int port
, string pseudo
, string pass
, string realName
)
58 this.realName
= realName
;
59 this.charset
= Encoding
.UTF8
;
61 this.quitMessage
= "Powered by Monologue";
62 this.passiveMode
= true;
66 /// The hostname of the server
68 public string Server
{
75 /// The port used to connect to the server
84 /// The pseudo that will be used on the server
86 public string Pseudo
{
92 throw new ArgumentNullException("value");
98 /// The password used to identify on Irc
100 /// <remarks>Can be null or empty</remarks>
101 public string Password
{
108 /// The real name of the irc user. ex: Larry The Cow
110 public string RealName
{
117 /// The charset used to display characters
119 public Encoding Charset
{
129 /// Do we use a secure connection ?
140 public bool UsePassiveMode
{
150 /// Message that will be displayed when exitingIRC
152 public string QuitMessage
{
161 public static ConnectionInfo
GetDefault(string serv
, string nick
)
163 Circ
.Backend
.ConnectionInfo ci
= new Circ
.Backend
.ConnectionInfo(serv
, 6667, nick
, string.Empty
, nick
);
164 ci
.QuitMessage
= "Powered by Circ";