@@ -120,15 +120,16 @@ public CultureInfo Language(BasePlayer player)
120120 /// </summary>
121121 /// <param name="id"></param>
122122 /// <param name="reason"></param>
123- public void Ban ( ulong id , string reason = "" )
123+ /// <param name="expiry"></param>
124+ public void Ban ( ulong id , string reason = "" , long expiry = - 1L )
124125 {
125126 if ( IsBanned ( id ) )
126127 {
127128 return ;
128129 }
129130
130131 BasePlayer player = FindById ( id ) ;
131- ServerUsers . Set ( id , ServerUsers . UserGroup . Banned , player ? . displayName ?? "Unknown" , reason ) ;
132+ ServerUsers . Set ( id , ServerUsers . UserGroup . Banned , player ? . displayName ?? "Unknown" , reason , expiry ) ;
132133 ServerUsers . Save ( ) ;
133134 if ( player != null && IsConnected ( player ) )
134135 {
@@ -141,14 +142,16 @@ public void Ban(ulong id, string reason = "")
141142 /// </summary>
142143 /// <param name="id"></param>
143144 /// <param name="reason"></param>
144- public void Ban ( string id , string reason = "" ) => Ban ( Convert . ToUInt64 ( id ) , reason ) ;
145+ /// <param name="expiry"></param>
146+ public void Ban ( string id , string reason = "" , long expiry = - 1L ) => Ban ( Convert . ToUInt64 ( id ) , reason , expiry ) ;
145147
146148 /// <summary>
147149 /// Bans the player from the server
148150 /// </summary>
149151 /// <param name="player"></param>
150152 /// <param name="reason"></param>
151- public void Ban ( BasePlayer player , string reason = "" ) => Ban ( player . UserIDString , reason ) ;
153+ /// <param name="expiry"></param>
154+ public void Ban ( BasePlayer player , string reason = "" , long expiry = - 1L ) => Ban ( player . UserIDString , reason , expiry ) ;
152155
153156 /// <summary>
154157 /// Heals the player by specified amount
0 commit comments