Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //====//
- } else if strings.HasPrefix(txt,"upcmd"+":") || strings.HasPrefix(txt,name+"upcmd"+":"){
- if getAccess(ctime,cl.Mid) {
- result := strings.Split((text),":")
- msgjoin := strings.Split((result[1])," ")
- found := fmt.Sprintf("%s", msgjoin[0])
- if oop.Contains(commandKoh, found){
- listbl := "Update Command:"
- kowe := found
- jancuk := msgjoin[1]
- if _, cek := data.KohCmd[kowe]; cek {
- data.KohCmd[kowe] = jancuk
- listbl += "\n________________\nFrom Cmd: " +kowe+"\nChanged To✅: "+jancuk
- } else {
- go func(){KohCmdIn(kowe,jancuk)}()
- listbl += "\n________________\nFrom Cmd: " +kowe+"\nChanged To: "+jancuk
- }
- cl.SendMessage(to, listbl)
- SaveData()
- }else{cl.SendMessage(to, "Don't have cmd: " +fmt.Sprintf("%s", found))}
- }
- } else if strings.HasPrefix(txt,"setcmd"+":") || strings.HasPrefix(txt,name+"setcmd"+":"){
- if getAccess(ctime,cl.Mid) {
- result := strings.Split((text),":")
- msgjoin := strings.Split((result[1])," ")
- numb, _ := strconv.Atoi(msgjoin[0])
- if numb > 0&&numb <= len(commandKoh){
- listbl := "Commandlist:"
- numb = numb - 1
- kowe := commandKoh[numb]
- jancuk := msgjoin[1]
- if _, cek := data.KohCmd[kowe]; cek {
- data.KohCmd[kowe] = jancuk
- listbl += "\nApplyCmd: " +kowe+"\nChanged To: "+jancuk
- } else {
- go func(){KohCmdIn(kowe,jancuk)}()
- listbl += "\n________________\nNewCmd: " +jancuk+"\nChanged from: "+kowe
- }
- cl.SendMessage(to, listbl)
- SaveData()
- }else{cl.SendMessage(to, "Error cmd: " +fmt.Sprintf("%v", numb))}
- }
- //====//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement