MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / group_add_member

Function group_add_member

Scripts/ButSystem.py:14492–14523  ·  view source on GitHub ↗

group_add_member. Chat/group feature helper or route handler. This docstring was expanded to make future maintenance easier. Args: gid: Parameter. Returns: Varies.

(gid: int)

Source from the content-addressed store, hash-verified

14490 if is_encrypted_file(sp):
14491 gen = aesgcm_decrypt_generator(sp)
14492 resp = Response(gen, mimetype=mime)
14493 else:
14494 from flask import send_file
14495 resp = send_file(sp, mimetype=mime, as_attachment=False, conditional=True, max_age=0)
14496 except Exception:
14497 abort(404)
14498
14499 resp.headers["Cache-Control"] = "no-store"
14500 return resp
14501
14502
14503# API: typeahead
14504
14505def _user_match_score(q: str, u: str) -> int:
14506 """_user_match_score.
14507
14508Internal helper function.
14509
14510This docstring was added automatically to improve maintainability.
14511
14512Args:
14513 q: Parameter.
14514 u: Parameter.
14515
14516Returns:
14517 Varies.
14518"""
14519 q = q.lower()
14520 u2 = u.lower()
14521 if u2.startswith(q):
14522 return 0
14523 if q in u2:
14524 return 1
14525 return 2
14526

Callers

nothing calls this directly

Calls 4

current_userFunction · 0.70
group_roleFunction · 0.70
db_connectFunction · 0.70
now_zFunction · 0.70

Tested by

no test coverage detected