ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_away.c
(Generate patch)

Comparing ircd-hybrid/trunk/modules/m_away.c (file contents):
Revision 3875 by michael, Fri Jun 6 14:46:28 2014 UTC vs.
Revision 4313 by michael, Thu Jul 31 18:50:11 2014 UTC

# Line 73 | Line 73 | m_away(struct Client *source_p, int parc
73      return 0;
74    }
75  
76 <  if ((CurrentTime - source_p->localClient->last_away) < ConfigFileEntry.pace_wait)
76 >  if ((source_p->localClient->away.last_attempt + ConfigFileEntry.away_time) < CurrentTime)
77 >    source_p->localClient->away.count = 0;
78 >
79 >  if (source_p->localClient->away.count > ConfigFileEntry.away_count)
80    {
81 <    sendto_one_numeric(source_p, &me, RPL_LOAD2HI);
81 >    sendto_one_numeric(source_p, &me, ERR_TOOMANYAWAY);
82      return 0;
83    }
84  
85 <  source_p->localClient->last_away = CurrentTime;
86 <  sendto_one_numeric(source_p, &me, RPL_NOWAWAY);
84 <
85 <  if (!strncmp(source_p->away, parv[1], sizeof(source_p->away) - 1))
86 <    return 0;
85 >  source_p->localClient->away.last_attempt = CurrentTime;
86 >  source_p->localClient->away.count++;
87  
88    strlcpy(source_p->away, parv[1], sizeof(source_p->away));
89  
90 +  sendto_one_numeric(source_p, &me, RPL_NOWAWAY);
91    sendto_common_channels_local(source_p, 1, CAP_AWAY_NOTIFY, ":%s!%s@%s AWAY :%s",
92                                 source_p->name, source_p->username,
93                                 source_p->host, source_p->away);
# Line 126 | Line 127 | ms_away(struct Client *source_p, int par
127      return 0;
128    }
129  
129  if (!strncmp(source_p->away, parv[1], sizeof(source_p->away) - 1))
130    return 0;
131
130    strlcpy(source_p->away, parv[1], sizeof(source_p->away));
131  
132    sendto_common_channels_local(source_p, 1, CAP_AWAY_NOTIFY, ":%s!%s@%s AWAY :%s",

Diff Legend

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