5 |
|
// $Id$ |
6 |
|
|
7 |
|
#include "AwayMessage.hpp" |
8 |
+ |
#include "Matcher.hpp" |
9 |
+ |
|
10 |
+ |
ext::String AwayMessage::getLink(const Buddy& buddy) const |
11 |
+ |
{ |
12 |
+ |
return buddy.getLink() + "#z" + stamp.getW3(); |
13 |
+ |
} |
14 |
+ |
|
15 |
+ |
ext::String AwayMessage::getTag(const Buddy& buddy) const |
16 |
+ |
{ |
17 |
+ |
Matcher matcher("^http://([a-zA-Z.\\-0-9]+)(/.*)$"); |
18 |
+ |
|
19 |
+ |
if (buddy.getLink() == matcher) |
20 |
+ |
{ |
21 |
+ |
return "tag:" + matcher[1] + "," + stamp.get8601() + ":" + matcher[2] |
22 |
+ |
+ "/z" + stamp.getW3(); |
23 |
+ |
} |
24 |
+ |
else |
25 |
+ |
{ |
26 |
+ |
cerr << Zoe::program << ": AwayMessage::getTag(" << buddy << ")\n"; |
27 |
+ |
|
28 |
+ |
exit(1); |
29 |
+ |
} |
30 |
+ |
} |
31 |
|
|
32 |
|
AwayMessage::operator ext::String() const |
33 |
|
{ |