ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/anope-protocol-module/hybrid.cpp
(Generate patch)

Comparing anope-protocol-module/hybrid.cpp (file contents):
Revision 1557 by michael, Sat Oct 13 20:31:14 2012 UTC vs.
Revision 1558 by michael, Sat Oct 13 22:12:10 2012 UTC

# Line 23 | Line 23 | public:
23      DefaultPseudoclientModes = "+oi";
24      CanSNLine = true;
25      CanSQLine = true;
26 <    CanSZLine = false; /* hybrid currently does support remote d-lines, but we disable it for now */
26 >    CanSZLine = true;
27      RequiresID = true;
28      MaxModes = 4;
29    }
# Line 38 | Line 38 | public:
38      UplinkSocket::Message(bi) << "PRIVMSG $$" << dest->GetName() << " :" << msg;
39    }
40  
41 <  void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf) anope_override
41 >  void SendGlobopsInternal(const BotInfo *bi, const Anope::string &buf) anope_override
42    {
43 <    UplinkSocket::Message(source) << "GLOBOPS :" << buf;
43 >    UplinkSocket::Message(bi) << "GLOBOPS :" << buf;
44    }
45  
46    void SendSQLine(User *, const XLine *x) anope_override
47    {
48 <    UplinkSocket::Message(Me) << "RESV * " << x->Mask << " :" << x->GetReason();
48 >    const BotInfo *bi = findbot(Config->OperServ);
49 >
50 >    UplinkSocket::Message(bi) << "RESV * " << x->Mask << " :" << x->GetReason();
51    }
52  
53    void SendSGLineDel(const XLine *x) anope_override
# Line 62 | Line 64 | public:
64      UplinkSocket::Message(bi) << "XLINE * " << x->Mask << " 0 :" << x->GetReason();
65    }
66  
67 +  void SendSZLineDel(const XLine *x) anope_override
68 +  {
69 +    const BotInfo *bi = findbot(Config->OperServ);
70 +
71 +    UplinkSocket::Message(bi) << "UNDLINE * " << x->GetHost();
72 +  }
73 +
74 +  void SendSZLine(User *, const XLine *x) anope_override
75 +  {
76 +    const BotInfo *bi = findbot(Config->OperServ);
77 +    /* Calculate the time left before this would expire, capping it at 2 days */
78 +    time_t timeleft = x->Expires - Anope::CurTime;
79 +
80 +    if (timeleft > 172800 || !x->Expires)
81 +      timeleft = 172800;
82 +
83 +    UplinkSocket::Message(bi) << "DLINE * " << timeleft << " " << x->GetHost() << " :" << x->GetReason();
84 +  }
85 +
86    void SendAkillDel(const XLine *x) anope_override
87    {
88      if (x->IsRegex() || x->HasNickOrReal())
# Line 74 | Line 95 | public:
95  
96    void SendSQLineDel(const XLine *x) anope_override
97    {
98 <    UplinkSocket::Message(Me) << "UNRESV * " << x->Mask;
98 >    const BotInfo *bi = findbot(Config->OperServ);
99 >
100 >    UplinkSocket::Message(bi) << "UNRESV * " << x->Mask;
101    }
102  
103    void SendJoin(const User *user, Channel *c, const ChannelStatus *status) anope_override
# Line 339 | Line 362 | struct IRCDMessagePass : IRCDMessage
362   {
363    IRCDMessagePass() : IRCDMessage("PASS", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); }
364  
365 +  /*      0        1  2 3   */
366 +  /* PASS password TS 6 0MC */
367    bool Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
368    {
369      UplinkSID = params[3];

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)