m_spanningtree Extract logic that finds the source user for an incoming command into a function