Advertisement
kohpriwniranam

cidego

Feb 9th, 2023
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. //====//
  2. } else if strings.HasPrefix(txt,"upcmd"+":") || strings.HasPrefix(txt,name+"upcmd"+":"){
  3. if getAccess(ctime,cl.Mid) {
  4. result := strings.Split((text),":")
  5. msgjoin := strings.Split((result[1])," ")
  6. found := fmt.Sprintf("%s", msgjoin[0])
  7. if oop.Contains(commandKoh, found){
  8. listbl := "Update Command:"
  9. kowe := found
  10. jancuk := msgjoin[1]
  11. if _, cek := data.KohCmd[kowe]; cek {
  12. data.KohCmd[kowe] = jancuk
  13. listbl += "\n________________\nFrom Cmd: " +kowe+"\nChanged To✅: "+jancuk
  14. } else {
  15. go func(){KohCmdIn(kowe,jancuk)}()
  16. listbl += "\n________________\nFrom Cmd: " +kowe+"\nChanged To: "+jancuk
  17. }
  18. cl.SendMessage(to, listbl)
  19. SaveData()
  20. }else{cl.SendMessage(to, "Don't have cmd: " +fmt.Sprintf("%s", found))}
  21. }
  22. } else if strings.HasPrefix(txt,"setcmd"+":") || strings.HasPrefix(txt,name+"setcmd"+":"){
  23. if getAccess(ctime,cl.Mid) {
  24. result := strings.Split((text),":")
  25. msgjoin := strings.Split((result[1])," ")
  26. numb, _ := strconv.Atoi(msgjoin[0])
  27. if numb > 0&&numb <= len(commandKoh){
  28. listbl := "Commandlist:"
  29. numb = numb - 1
  30. kowe := commandKoh[numb]
  31. jancuk := msgjoin[1]
  32. if _, cek := data.KohCmd[kowe]; cek {
  33. data.KohCmd[kowe] = jancuk
  34. listbl += "\nApplyCmd: " +kowe+"\nChanged To: "+jancuk
  35. } else {
  36. go func(){KohCmdIn(kowe,jancuk)}()
  37. listbl += "\n________________\nNewCmd: " +jancuk+"\nChanged from: "+kowe
  38. }
  39. cl.SendMessage(to, listbl)
  40. SaveData()
  41. }else{cl.SendMessage(to, "Error cmd: " +fmt.Sprintf("%v", numb))}
  42. }
  43. //====//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement