1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-16 14:05:07 -05:00

Removed logging from yaaic

This commit is contained in:
Sebastian Kaspari 2010-03-21 15:51:08 +01:00
parent 81c24c5128
commit 50346ef5f5
5 changed files with 6 additions and 108 deletions

View File

@ -31,7 +31,6 @@ import org.yaaic.model.Status;
import android.content.Intent; import android.content.Intent;
import android.os.Binder; import android.os.Binder;
import android.util.Log;
/** /**
* Binder for service communication * Binder for service communication
@ -79,9 +78,6 @@ public class IRCBinder extends Binder
} }
} }
catch (Exception e) { catch (Exception e) {
Log.d(TAG, "Exception: " + e.getMessage());
server.setStatus(Status.DISCONNECTED); server.setStatus(Status.DISCONNECTED);
Intent sIntent = new Intent(Broadcast.SERVER_UPDATE); Intent sIntent = new Intent(Broadcast.SERVER_UPDATE);
sIntent.putExtra(Broadcast.EXTRA_SERVER, server.getId()); sIntent.putExtra(Broadcast.EXTRA_SERVER, server.getId());

View File

@ -24,7 +24,6 @@ import java.io.UnsupportedEncodingException;
import java.util.Vector; import java.util.Vector;
import android.content.Intent; import android.content.Intent;
import android.util.Log;
import org.jibble.pircbot.Colors; import org.jibble.pircbot.Colors;
import org.jibble.pircbot.PircBot; import org.jibble.pircbot.PircBot;
@ -53,9 +52,6 @@ public class IRCConnection extends PircBot
private IRCService service; private IRCService service;
private Server server; private Server server;
// XXX: Print all IRC events to the debug console
private static final boolean DEBUG_EVENTS = false;
/** /**
* Create a new connection * Create a new connection
* *
@ -73,7 +69,7 @@ public class IRCConnection extends PircBot
try { try {
this.setEncoding("UTF-8"); this.setEncoding("UTF-8");
} catch(UnsupportedEncodingException e) { } catch(UnsupportedEncodingException e) {
Log.d(TAG, "Unsupported charset - " + e.getMessage()); // Use default charset
} }
this.setFinger("http://www.youtube.com/watch?v=oHg5SJYRHA0"); this.setFinger("http://www.youtube.com/watch?v=oHg5SJYRHA0");
@ -132,8 +128,6 @@ public class IRCConnection extends PircBot
@Override @Override
public void onConnect() public void onConnect()
{ {
debug("Connect", "");
server.setStatus(Status.CONNECTED); server.setStatus(Status.CONNECTED);
service.sendBroadcast(new Intent(Broadcast.SERVER_UPDATE)); service.sendBroadcast(new Intent(Broadcast.SERVER_UPDATE));
@ -153,8 +147,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onAction(String sender, String login, String hostname, String target, String action) protected void onAction(String sender, String login, String hostname, String target, String action)
{ {
debug("Action", target + " " + sender + " " + action);
// Strip mIRC colors and formatting // Strip mIRC colors and formatting
action = Colors.removeFormattingAndColors(action); action = Colors.removeFormattingAndColors(action);
@ -202,7 +194,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onChannelInfo(String channel, int userCount, String topic) protected void onChannelInfo(String channel, int userCount, String topic)
{ {
debug("ChannelInfo", channel + " " + userCount);
} }
/** /**
@ -211,8 +202,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onDeop(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient) protected void onDeop(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient)
{ {
debug("Deop", target + " " + recipient + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " deops " + recipient); Message message = new Message(sourceNick + " deops " + recipient);
message.setIcon(R.drawable.op); message.setIcon(R.drawable.op);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
@ -230,8 +219,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onDeVoice(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient) protected void onDeVoice(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient)
{ {
debug("DeVoice", target + " " + recipient + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " devoices " + recipient); Message message = new Message(sourceNick + " devoices " + recipient);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
message.setIcon(R.drawable.voice); message.setIcon(R.drawable.voice);
@ -249,8 +236,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onInvite(String targetNick, String sourceNick, String sourceLogin, String sourceHostname, String target) protected void onInvite(String targetNick, String sourceNick, String sourceLogin, String sourceHostname, String target)
{ {
debug("Invite", target + " " + targetNick + "(" + sourceNick + ")");
if (targetNick.equals(this.getNick())) { if (targetNick.equals(this.getNick())) {
// We are invited // We are invited
Message message = new Message(sourceNick + " invites you into " + target); Message message = new Message(sourceNick + " invites you into " + target);
@ -278,8 +263,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onJoin(String target, String sender, String login, String hostname) protected void onJoin(String target, String sender, String login, String hostname)
{ {
debug("Join", target + " " + sender);
if (sender.equals(getNick())) { if (sender.equals(getNick())) {
// We joined a new channel // We joined a new channel
server.addConversationl(new Channel(target)); server.addConversationl(new Channel(target));
@ -307,8 +290,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onKick(String target, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason) protected void onKick(String target, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason)
{ {
debug("Kick", target + " " + recipientNick + "(" + kickerNick + ")");
if (recipientNick.equals(getNick())) { if (recipientNick.equals(getNick())) {
// We are kicked // We are kicked
server.removeConversation(target); server.removeConversation(target);
@ -335,8 +316,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onMessage(String target, String sender, String login, String hostname, String text) protected void onMessage(String target, String sender, String login, String hostname, String text)
{ {
debug("Message", target + " " + sender + " " + text);
// Strip mIRC colors and formatting // Strip mIRC colors and formatting
text = Colors.removeFormattingAndColors(text); text = Colors.removeFormattingAndColors(text);
@ -361,8 +340,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onMode(String target, String sourceNick, String sourceLogin, String sourceHostname, String mode) protected void onMode(String target, String sourceNick, String sourceLogin, String sourceHostname, String mode)
{ {
debug("Mode", target + " " + sourceNick + " " + mode);
/*//Disabled as it doubles events (e.g. onOp and onMode will be called) /*//Disabled as it doubles events (e.g. onOp and onMode will be called)
Message message = new Message(sourceNick + " sets mode " + mode); Message message = new Message(sourceNick + " sets mode " + mode);
server.getChannel(target).addMessage(message); server.getChannel(target).addMessage(message);
@ -380,8 +357,7 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onNickChange(String oldNick, String login, String hostname, String newNick) protected void onNickChange(String oldNick, String login, String hostname, String newNick)
{ {
debug("Nick", oldNick + " " + newNick); // XXX: Optimization : No getter in for loop
for (String target : getChannelsByNickname(newNick)) { for (String target : getChannelsByNickname(newNick)) {
Message message = new Message(oldNick + " is now known as " + newNick); Message message = new Message(oldNick + " is now known as " + newNick);
message.setColor(Message.COLOR_GREEN); message.setColor(Message.COLOR_GREEN);
@ -400,8 +376,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice) protected void onNotice(String sourceNick, String sourceLogin, String sourceHostname, String target, String notice)
{ {
debug("Notice", sourceNick + " " + notice);
// Strip mIRC colors and formatting // Strip mIRC colors and formatting
notice = Colors.removeFormattingAndColors(notice); notice = Colors.removeFormattingAndColors(notice);
@ -429,8 +403,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onOp(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient) protected void onOp(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient)
{ {
debug("Op", target + " " + recipient + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " ops " + recipient); Message message = new Message(sourceNick + " ops " + recipient);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
message.setIcon(R.drawable.op); message.setIcon(R.drawable.op);
@ -448,8 +420,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onPart(String target, String sender, String login, String hostname) protected void onPart(String target, String sender, String login, String hostname)
{ {
debug("Part", target + " " + sender);
if (sender.equals(getNick())) { if (sender.equals(getNick())) {
// We parted a channel // We parted a channel
server.removeConversation(target); server.removeConversation(target);
@ -477,8 +447,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onPrivateMessage(String sender, String login, String hostname, String text) protected void onPrivateMessage(String sender, String login, String hostname, String text)
{ {
debug("PrivateMessage", sender + " " + text);
// Strip mIRC colors and formatting // Strip mIRC colors and formatting
text = Colors.removeFormattingAndColors(text); text = Colors.removeFormattingAndColors(text);
@ -516,9 +484,8 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason) protected void onQuit(String sourceNick, String sourceLogin, String sourceHostname, String reason)
{ {
debug("Quit", sourceNick);
if (!sourceNick.equals(this.getNick())) { if (!sourceNick.equals(this.getNick())) {
// XXX: Optimization : No getter in for loop
for (String target : getChannelsByNickname(sourceNick)) { for (String target : getChannelsByNickname(sourceNick)) {
Message message = new Message(sourceNick + " quits (" + reason + ")"); Message message = new Message(sourceNick + " quits (" + reason + ")");
message.setColor(Message.COLOR_GREEN); message.setColor(Message.COLOR_GREEN);
@ -560,8 +527,6 @@ public class IRCConnection extends PircBot
// strip mIRC colors // strip mIRC colors
topic = Colors.removeFormattingAndColors(topic); topic = Colors.removeFormattingAndColors(topic);
debug("Topic", target + " " + setBy + " " + topic);
if (changed) { if (changed) {
Message message = new Message(setBy + " sets topic: " + topic); Message message = new Message(setBy + " sets topic: " + topic);
message.setColor(Message.COLOR_YELLOW); message.setColor(Message.COLOR_YELLOW);
@ -587,8 +552,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onUserList(String channel, User[] users) protected void onUserList(String channel, User[] users)
{ {
debug("UserList", channel + " (" + users.length + ")");
// XXX: Store user list somewhere and keep it updated or just broadcast some event? // XXX: Store user list somewhere and keep it updated or just broadcast some event?
} }
@ -598,8 +561,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onVoice(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient) protected void onVoice(String target, String sourceNick, String sourceLogin, String sourceHostname, String recipient)
{ {
debug("Voice", target + " " + recipient + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " voices " + recipient); Message message = new Message(sourceNick + " voices " + recipient);
message.setIcon(R.drawable.voice); message.setIcon(R.drawable.voice);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
@ -617,8 +578,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key) protected void onRemoveChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key)
{ {
debug("onRemoveChannelKey", target + " " + sourceNick + " " + key);
Message message = new Message(sourceNick + " removes channel key"); Message message = new Message(sourceNick + " removes channel key");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -634,8 +593,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key) protected void onSetChannelKey(String target, String sourceNick, String sourceLogin, String sourceHostname, String key)
{ {
debug("onSetChannelKey", target + " " + sourceNick + " " + key);
Message message = new Message(sourceNick + " sets channel key: " + key); Message message = new Message(sourceNick + " sets channel key: " + key);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -651,8 +608,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetSecret(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetSecret(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetSecret", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel secret"); Message message = new Message(sourceNick + " sets channel secret");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -668,8 +623,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveSecret(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveSecret(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveSecret", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel public"); Message message = new Message(sourceNick + " sets channel public");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -685,8 +638,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname, int limit) protected void onSetChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname, int limit)
{ {
debug("onSetChannelLimit", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets limit: " + limit); Message message = new Message(sourceNick + " sets limit: " + limit);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -702,8 +653,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveChannelLimit(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveChannelLimit", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes limit"); Message message = new Message(sourceNick + " removes limit");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -719,8 +668,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetChannelBan(String target, String sourceNick, String sourceLogin, String sourceHostname, String hostmask) protected void onSetChannelBan(String target, String sourceNick, String sourceLogin, String sourceHostname, String hostmask)
{ {
debug("onSetChannelBan", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets ban: " + hostmask); Message message = new Message(sourceNick + " sets ban: " + hostmask);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -736,8 +683,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveChannelBan(String target, String sourceNick, String sourceLogin, String sourceHostname, String hostmask) protected void onRemoveChannelBan(String target, String sourceNick, String sourceLogin, String sourceHostname, String hostmask)
{ {
debug("onRemoveChannelBan", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes ban: " + hostmask); Message message = new Message(sourceNick + " removes ban: " + hostmask);
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -753,8 +698,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetTopicProtection", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets topic protection"); Message message = new Message(sourceNick + " sets topic protection");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -770,8 +713,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveTopicProtection(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveTopicProtection", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes topic protection"); Message message = new Message(sourceNick + " removes topic protection");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -787,8 +728,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetNoExternalMessages(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetNoExternalMessages(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetNoExternalMessages", sourceNick + " " + target);
Message message = new Message(sourceNick + " disables external messages"); Message message = new Message(sourceNick + " disables external messages");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -804,8 +743,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveNoExternalMessages(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveNoExternalMessages(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveNoExternalMessages", sourceNick + " " + target);
Message message = new Message(sourceNick + " enables external messages"); Message message = new Message(sourceNick + " enables external messages");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -821,8 +758,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetInviteOnly(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetInviteOnly(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetInviteOnly", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets invite only"); Message message = new Message(sourceNick + " sets invite only");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -838,8 +773,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveInviteOnly(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveInviteOnly(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveInviteOnly", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes invite only"); Message message = new Message(sourceNick + " removes invite only");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -855,8 +788,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetModerated(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetModerated(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetModerated", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets moderated"); Message message = new Message(sourceNick + " sets moderated");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -872,8 +803,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemoveModerated(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemoveModerated(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemoveModerated", sourceNick + " " + target);
Message message = new Message(sourceNick + " removes moderated"); Message message = new Message(sourceNick + " removes moderated");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -889,8 +818,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onSetPrivate(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onSetPrivate(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onSetPrivate", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel private"); Message message = new Message(sourceNick + " sets channel private");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -906,8 +833,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onRemovePrivate(String target, String sourceNick, String sourceLogin, String sourceHostname) protected void onRemovePrivate(String target, String sourceNick, String sourceLogin, String sourceHostname)
{ {
debug("onRemovePrivate", sourceNick + " " + target);
Message message = new Message(sourceNick + " sets channel public"); Message message = new Message(sourceNick + " sets channel public");
message.setColor(Message.COLOR_BLUE); message.setColor(Message.COLOR_BLUE);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
@ -923,8 +848,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onUnknown(String line) protected void onUnknown(String line)
{ {
debug("Unknown", line);
Message message = new Message(line); Message message = new Message(line);
message.setIcon(R.drawable.action); message.setIcon(R.drawable.action);
message.setColor(Message.COLOR_GREY); message.setColor(Message.COLOR_GREY);
@ -942,8 +865,6 @@ public class IRCConnection extends PircBot
@Override @Override
protected void onServerResponse(int code, String response) protected void onServerResponse(int code, String response)
{ {
debug("ServerResponse", code + " " + response);
if (code == 372 || code == 375 || code == 376) { if (code == 372 || code == 375 || code == 376) {
// Skip MOTD // Skip MOTD
return; return;
@ -996,16 +917,6 @@ public class IRCConnection extends PircBot
service.sendBroadcast(cIntent); service.sendBroadcast(cIntent);
} }
/**
* Print an event to the debug console
*/
private void debug(String event, String params)
{
if (DEBUG_EVENTS) {
Log.d(TAG, "(" + server.getTitle() + ") [" + event + "]: " + params);
}
}
/** /**
* Get all channels where the user with the given nickname is online * Get all channels where the user with the given nickname is online
* *
@ -1016,7 +927,9 @@ public class IRCConnection extends PircBot
{ {
Vector<String> channels = new Vector<String>(); Vector<String> channels = new Vector<String>();
// XXX: Optimization : No getter in for loop
for (String channel : this.getChannels()) { for (String channel : this.getChannels()) {
// XXX: Optimization : No getter in for loop
for (User user : this.getUsers(channel)) { for (User user : this.getUsers(channel)) {
if (user.getNick().equals(nickname)) { if (user.getNick().equals(nickname)) {
channels.add(channel); channels.add(channel);
@ -1025,8 +938,6 @@ public class IRCConnection extends PircBot
} }
} }
Log.d(TAG, "Found " + channels.size() + " channels for nickname " + nickname);
return channels; return channels;
} }

View File

@ -28,7 +28,6 @@ import org.yaaic.model.Broadcast;
import android.app.Service; import android.app.Service;
import android.content.Intent; import android.content.Intent;
import android.util.Log;
/** /**
* The background service for managing the irc connections * The background service for managing the irc connections
@ -49,8 +48,6 @@ public class IRCService extends Service
{ {
super(); super();
Log.d(TAG, "Service created...");
this.connections = new HashMap<Integer, IRCConnection>(); this.connections = new HashMap<Integer, IRCConnection>();
this.binder = new IRCBinder(this); this.binder = new IRCBinder(this);
} }
@ -60,8 +57,6 @@ public class IRCService extends Service
{ {
super.onCreate(); super.onCreate();
Log.d(TAG, "Loading servers from database");
// Load servers from Database // Load servers from Database
Database db = new Database(this); Database db = new Database(this);
Yaaic.getInstance().setServers(db.getServers()); Yaaic.getInstance().setServers(db.getServers());
@ -74,7 +69,6 @@ public class IRCService extends Service
@Override @Override
public void onStart(Intent intent, int startId) public void onStart(Intent intent, int startId)
{ {
Log.d(TAG, "onStart()");
super.onStart(intent, startId); super.onStart(intent, startId);
} }

View File

@ -27,7 +27,6 @@ import android.content.IntentFilter;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
@ -245,7 +244,7 @@ public class ConversationActivity extends Activity implements ServiceConnection,
if (adapter != null) { if (adapter != null) {
adapter.addMessage(message); adapter.addMessage(message);
} else { } else {
Log.d(TAG, "MessageListAdapter is null (conversation " + conversation.getName() + " has no adapter assigned)"); //"MessageListAdapter is null (conversation " + conversation.getName() + " has no adapter assigned)"
} }
} }
} }

View File

@ -29,7 +29,6 @@ import android.content.IntentFilter;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
@ -274,7 +273,6 @@ public class ServersActivity extends ListActivity implements ServiceConnection,
*/ */
public void onStatusUpdate() public void onStatusUpdate()
{ {
Log.d(TAG, "Received server status update");
adapter.loadServers(); adapter.loadServers();
} }