Updated Makefile. Removed commented out code.
This commit is contained in:
parent
82592a13fe
commit
73df2217d9
17
Makefile
17
Makefile
@ -1,28 +1,29 @@
|
||||
FLAGS = -pthread
|
||||
OFLAGS = -g
|
||||
|
||||
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 $@
|
||||
|
||||
user.o: user.cpp user.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
connection.o: connection.cpp connection.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
ircserver.o: ircserver.cpp ircserver.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
irccommand.o: irccommand.cpp irccommand.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
userconnection.o: userconnection.cpp userconnection.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
nameable.o: nameable.cpp nameable.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
channel.o: channel.cpp channel.h
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
||||
|
||||
main.o: main.cpp
|
||||
g++ -g -c $*.cpp
|
||||
g++ $(OFLAGS) -c $*.cpp
|
6
user.cpp
6
user.cpp
@ -125,10 +125,6 @@ std::vector<IRCCommand> User::privmsg_cmd(IRCCommand cmd) {
|
||||
|
||||
if (server->has_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());
|
||||
}
|
||||
|
||||
@ -203,7 +199,7 @@ std::vector<IRCCommand> User::motd_cmd(IRCCommand cmd) {
|
||||
|
||||
std::vector<IRCCommand> User::process_cmd(IRCCommand cmd) {
|
||||
auto command = commands.find(cmd.get_command());
|
||||
//return {};
|
||||
|
||||
if (command == commands.end()) {
|
||||
return {IRCCommand(server->get_hostname(), "421", get_nick(), cmd.get_command(), "Unknown Command.")};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user