diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-06 18:26:24 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2021-09-06 18:26:24 +0200 |
commit | d87cc0484f99882b26f7cc2de2220459b58339ca (patch) | |
tree | 7e492028150e6a5f8d2aa1531754fbbcfb7ca683 /client_conn.go | |
parent | 18a80c7a57639a540965f9b101db18c6490cd804 (diff) |
Only load plugins once + memory optimisations
Diffstat (limited to 'client_conn.go')
-rw-r--r-- | client_conn.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/client_conn.go b/client_conn.go index 9278578..bffc0e7 100644 --- a/client_conn.go +++ b/client_conn.go @@ -566,8 +566,7 @@ func handleClt(cc *ClientConn) { cc.Log("-->", append([]string{"cmd", cmdName}, args...)) - pluginsMu.RLock() - for _, p := range plugins { + for p := range plugins { sym, err := p.Lookup("HandleChatCmd") if err != nil { cc.Log("-->", err) @@ -581,7 +580,6 @@ func handleClt(cc *ClientConn) { } } } - pluginsMu.RUnlock() if !handled { cc.SendCmd(&mt.ToCltChatMsg{ |