Updated Makefile. Removed commented out code.

This commit is contained in:
Xnoe 2021-06-20 22:36:29 +01:00
parent 82592a13fe
commit 73df2217d9
Signed by: xnoe
GPG Key ID: 45AC398F44F0DAFE
2 changed files with 10 additions and 13 deletions

View File

@ -1,28 +1,29 @@
FLAGS = -pthread FLAGS = -pthread
OFLAGS = -g
xnoircd: user.o nameable.o channel.o connection.o ircserver.o irccommand.o userconnection.o main.o xnoircd: user.o nameable.o channel.o connection.o ircserver.o irccommand.o userconnection.o main.o
g++ $(FLAGS) user.o nameable.o channel.o connection.o ircserver.o irccommand.o userconnection.o main.o -o $@ g++ $(FLAGS) user.o nameable.o channel.o connection.o ircserver.o irccommand.o userconnection.o main.o -o $@
user.o: user.cpp user.h user.o: user.cpp user.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
connection.o: connection.cpp connection.h connection.o: connection.cpp connection.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
ircserver.o: ircserver.cpp ircserver.h ircserver.o: ircserver.cpp ircserver.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
irccommand.o: irccommand.cpp irccommand.h irccommand.o: irccommand.cpp irccommand.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
userconnection.o: userconnection.cpp userconnection.h userconnection.o: userconnection.cpp userconnection.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
nameable.o: nameable.cpp nameable.h nameable.o: nameable.cpp nameable.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
channel.o: channel.cpp channel.h channel.o: channel.cpp channel.h
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp
main.o: main.cpp main.o: main.cpp
g++ -g -c $*.cpp g++ $(OFLAGS) -c $*.cpp

View File

@ -125,10 +125,6 @@ std::vector<IRCCommand> User::privmsg_cmd(IRCCommand cmd) {
if (server->has_addressable_name(named_target)) { if (server->has_addressable_name(named_target)) {
Nameable* target = server->resolve_addressable_name(named_target); Nameable* target = server->resolve_addressable_name(named_target);
/*for (Nameable* associate : target->get_associates()) {
if (associate->get_addressable_name() != this->get_nick())
associate->send_direct({IRCCommand(this->get_nick(), "PRIVMSG", named_target, cmd.get_parameter(1))});
}*/
target->send_direct({IRCCommand(this->get_nick(), "PRIVMSG", named_target, cmd.get_parameter(1))}, this->get_nick()); target->send_direct({IRCCommand(this->get_nick(), "PRIVMSG", named_target, cmd.get_parameter(1))}, this->get_nick());
} }
@ -203,7 +199,7 @@ std::vector<IRCCommand> User::motd_cmd(IRCCommand cmd) {
std::vector<IRCCommand> User::process_cmd(IRCCommand cmd) { std::vector<IRCCommand> User::process_cmd(IRCCommand cmd) {
auto command = commands.find(cmd.get_command()); auto command = commands.find(cmd.get_command());
//return {};
if (command == commands.end()) { if (command == commands.end()) {
return {IRCCommand(server->get_hostname(), "421", get_nick(), cmd.get_command(), "Unknown Command.")}; return {IRCCommand(server->get_hostname(), "421", get_nick(), cmd.get_command(), "Unknown Command.")};
} }